A preconfigured SvelteKit static blog starter, with Sass, Markdown, MDSvex, Rehype, background preloading, and more. See the README for full details.
The SvelteKit static blog starter is a comprehensive solution for creating a static site generator for Markdown and Svelte-powered blogs. It leverages the power of SvelteKit to provide fast static site generation with hydration, allowing every route to be compiled into static HTML and optionally routed with JavaScript. With features such as zero-config preloading, Markdown support, pagination, category pages, and a JSON API for posts, this starter provides everything needed to create a dynamic and efficient blog. It also includes several customization options and features for enhanced SEO, responsive design, and page transitions.
To get started with the SvelteKit static blog starter, follow these steps:
npm install
npm run dev
This will start the dev server, and any changes made to components and styles will auto-refresh quickly.
Next, update the src/lib/config.js
file to reflect your site’s domain and preferences. This file is also where the navigation menu can be updated.
To add new posts, simply drop a new Markdown (.md) file into the src/lib/posts
directory. The new posts will automatically be displayed on the site, added to the posts API, and included in any category pages. It is important to define the date and an excerpt in the frontmatter of each post, as they are used for sorting and SEO meta tags.
If customization is needed for the layout or other frontmatter properties, make changes in the src/routes/blog/[post]/+page.svelte
file.
The SvelteKit static blog starter is an all-inclusive solution for creating a static site generator for Markdown and Svelte-powered blogs. It provides efficient static site generation with hydration, a pre-configured blog setup with Markdown support, pagination, category pages, and a JSON API for posts. The starter also offers customization options, responsive design, page transitions, and basic SEO features. With easy installation steps and straightforward customization instructions, this starter is a great choice for getting started with SvelteKit and building a powerful blog.