Themes

Introduction

Pass theme option to sveltepress to use a theme

Read Vite plugin options and Default theme options for more details

ChooseBest forContent modelSearch
Default themeDocumentation, product guides, API referencesSvelteKit routes written as Markdown or SvelteAlgolia DocSearch or Meilisearch through a custom wrapper (see the production caveat)
Blog themeEditorial sites and chronological publicationsMarkdown files in src/posts plus generated routesBuilt-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 . The live demo is the finished showcase; the Playground Blog theme Entries auto-boot the Blog starter.

Custom theme

There is no Guide leaf for Custom theme. Open it from Playground home — the Feature directory Entry auto-boots a newly authored Custom theme starter (no Default Theme, no Blog theme) at src/routes/+layout.svelte and src/routes/+page.md. Colored frames in the preview mark each wrap from the layout hierarchy : theme.globalLayout (GlobalLayout.svelte), src/routes/+layout.svelte, theme.pageLayout (PageLayout.svelte), and the page. Open /foo to also see src/routes/foo/+layout.svelte. Chinese and Bengali embed custom-theme-zh / custom-theme-bn, written in that language at the same default paths — not extra /zh/ or /bn/ routes.

The Playground Kitchen sink Entry is the largest Default Theme project that can coexist (Markdown, Default Theme, i18n, versions, Vite plugin, and virtual modules). Blog theme and custom theme never live in that tree.

Last update at: 2026/09/16 04:21