Getting Started
Quick Start
This quickest way to get started with Astro Theme Provider is to clone the theme template:
-
Clone the theme template:
-
Navigate to the created directory and install dependencies:
-
Run the playground to generate types for theme development and preview any changes:
-
Explore! Learn how Astro Theme Provider works by navigating the theme and reading the docs.
Setup Manually
If you are creating a theme inside an existing repository, you will have to set things up manually:
-
Create a package directory with the following structure:
Directorypackage/
Directorypublic/
- …
Directorysrc/
Directoryassets/
- …
Directorycomponents/
- …
Directorylayouts/
- …
Directorypages/
- …
Directorystyles/
- …
- index.ts
- package.json
- README.md
-
Create a playground directory to generate types and test changes:
Directoryplayground/
Directorypublic/
- …
Directorysrc/
- …
- astro.config.mjs
- package.json
- tsconfig.json
-
Add the package and playground directories to the workspace:
-
Add the theme package to the playground’s
package.json
and re-install dependencies: -
Add the theme package to the
integrations
array inside the playground’s Astro configuration: -
Run the playground to generate types for theme development and preview any changes