Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/astrolicious/astro-theme-provider-template
A template repo for creating theme integrations for Astro with Astro Theme Provider
https://github.com/astrolicious/astro-theme-provider-template
Last synced: 2 months ago
JSON representation
A template repo for creating theme integrations for Astro with Astro Theme Provider
- Host: GitHub
- URL: https://github.com/astrolicious/astro-theme-provider-template
- Owner: astrolicious
- Created: 2024-02-24T17:08:27.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-05-04T03:59:30.000Z (8 months ago)
- Last Synced: 2024-05-04T04:33:32.622Z (8 months ago)
- Language: Astro
- Homepage: https://github.com/BryceRussell/astro-theme-provider
- Size: 262 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Astro Theme Provider Template
This repository contains a template for creating an Astro theme integration with [`Astro Theme Provider`](https://github.com/astrolicious/astro-theme-provider).
## How to Author a Theme
1. Clone the [theme template](https://github.com/astrolicious/astro-theme-provider-template):
```sh
git clone https://github.com/astrolicious/astro-theme-provider-template.git my-theme
```2. Navigate to the created directory and install dependencies:
> **Important**: This repo uses ***pnpm*** workspaces, you must use ***pnpm*** as your package manager
```sh
cd my-theme/
pnpm install
```3. Run the playground to generate types for theme development and preview any changes:
> **Important**: The playground always has to be running to generate types when authoring a theme
```sh
pnpm playground:dev
```4. **Change the theme name**: The default name inside this repo is `my-theme`. It is recommended to use `find and replace` to replace all occurrences of `my-theme` inside the repo with the name of your own theme. If you can't find and replace, you can manually change the name inside the following files:
- `package/package.json`
- `playground/package.json` (Re-install dependencies inside playground after renaming)
- Update imports inside the `/package/src` folder
5. **Update `package.json`**: Add `homepage` and `repository` properties to your theme package (`package/package.json`), you should see warnings in the console that explains this further. While you are there, add or modify any other properties you may want like `description`, `keywords`, `license`, `author`, etc. (see: [configuring `package.json`](https://docs.npmjs.com/cli/v6/configuring-npm/package-json)).
6. **Explore!** Authoring a theme using `astro-theme-provider` is similar to creating a normal Astro project. Explore the repo and [check out the docs](https://astro-theme-provider.netlify.app/) to learn more about how to author a theme.