Themes
Introduction
Pass theme option to sveltepress to use a theme
Read Vite plugin options and Default theme options for more details
| Choose | Best for | Content model | Search |
|---|---|---|---|
| Default theme | Documentation, product guides, API references | SvelteKit routes written as Markdown or Svelte | Algolia DocSearch or Meilisearch through a custom wrapper (see the production caveat) |
| Blog theme | Editorial sites and chronological publications | Markdown files in src/posts plus generated routes | Built-in Pagefind integration |
Default theme
Install
npm install --save @sveltepress/theme-default sh
Add in your vite config
vite.config.(js|ts)
+
+
import { } from '@sveltepress/theme-default'
import { } from '@sveltepress/vite'
import { } from 'vite'
const = ({
: [
({
: (/** theme options */)
})
],
})
export default ts
Get more info about default theme in Default theme reference
Blog theme
The blog theme adds post indexing, pagination, tags, categories, RSS, Open Graph images, related posts, comments, and a Pagefind search UI. It generates a static site and currently requires @sveltejs/adapter-static plus a Pagefind post-build step.
Start with the blog theme guide and use the live demo as the runnable reference.