This is a blog site built with PureCSS, SvelteKit 1.0, and Strapi v4. It serves as an example of how to integrate a headless CMS with a SvelteKit frontend.
Before running the app, ensure that you have the following:
- Node.js installed on your machine.
- A running instance of Strapi with the necessary configuration.
- An
.env
file with the following variables:
PUBLIC_SUPABASE_URL="https://xxx.supabase.co"
PUBLIC_SUPABASE_KEY="xxx"
PUBLIC_STRAPI_URL="xxx"
STRAPI_KEY="xxx"
- Clone the repository:
git clone https://github.com/aaronm-git/svelte-blog.git
- Navigate to the project directory:
cd svelte-blog
- Install the dependencies:
npm install
- Create an
.env
file in the project root directory. - Open the
.env
file and provide the required variables:
PUBLIC_SUPABASE_URL="https://xxx.supabase.co"
PUBLIC_SUPABASE_KEY="" # Add your Supabase key here
PUBLIC_STRAPI_URL="" # Add your Strapi URL here
STRAPI_KEY="" # Add your Strapi key here
Make sure to replace the placeholder values (https://xxx.supabase.co
) with the actual URL of your Supabase instance.
- Start your Strapi app by following the necessary steps for running Strapi.
- Run the SvelteKit app:
npm run dev
- Open your browser and navigate to
http://localhost:5173
to access the blog site.
Contributions are welcome! If you find any issues or have suggestions for improvements, please submit a pull request or open an issue in the project repository.
This project is licensed under the MIT license. See the LICENSE file for more details.
- This project was inspired by the PureCSS framework and aims to showcase its usage in a SvelteKit application.
- Special thanks to the developers of SvelteKit, Strapi, and Supabase for providing excellent tools for building modern web applications.