Quick Start
How to clone the repo and get the boilerplate running.
Setup
-
Clone Repository
-
Install Packages
-
Start Dev Server
-
Edit Site Settings / Config
-
Edit Doc Settings / Config
-
Edit Document Navigation Settings / Config
-
Add Your Own Markdown
git clone https://github.com/BranDenn/SvelDocs bun install npm install pnpm install bun run dev npm run dev pnpm run dev Navigate to the src/lib/configuration/site.config.ts file to edit general site settings. These settings apply to the various parts of the site (not just docs) including SEO, llms.txt, sitemap.xml, and robots.txt. Feel free to add your own settings.
const siteConfig = {
name: 'SvelDocs',
origin: 'https://brandenn.github.io/SvelDocs',
description:
'SvelDocs is a template that helps you build elegant, searchable documentation sites with SvelteKit. It is open source and fully customizable, with built-in support for both server side rendering and static sites.'
} as const;
export default siteConfig; Navigate to the src/lib/configuration/docs.config.ts file to edit general settings specific to docs. Feel free to add your own settings.
const docsConfig = {
github: 'https://github.com/BranDenn/SvelDocs'
} as const;
export default docsConfig; Navigate to the src/lib/docs/server/navigation/doc-navigation.config.ts file to edit the document navigation settings. Refer to the Doc Navigation for more detail.
The navigation config should always be under a server folder to prevent exposure of potential private documents.
const docNavigationConfig = defineDocNavigation({
tabNextPrev: true,
tabs: [
{
title: 'Documentation',
combineHref: false,
icon: 'flag',
groups: [
{
title: 'Getting Started',
icon: 'goal',
showTitle: false,
combineHref: false,
pages: [
{ title: 'Introduction', icon: 'book-open-check', href: '/docs' },
{ title: 'Quick Start', icon: 'rocket' }
]
},
{
title: 'Configuration',
icon: 'cog',
pages: 'auto'
},
{
title: 'Components',
icon: 'blocks',
pages: 'auto'
},
{
title: 'Miscellaneous',
icon: 'dices',
pages: 'auto'
}
]
},
{
title: 'Guides',
combineHref: true,
icon: 'book',
pages: 'auto'
}
]
}); Navigate to the content folder to add your own markdown files. Ideally, the folder structure should correspond to your navigation structure.
const docNavigationConfig = defineDocNavigation({
tabs: [
{
title: 'Documentation',
groups: [
{
title: 'Getting Started',
pages: 'auto'
},
{
title: 'Components',
pages: 'auto'
}
]
},
{
title: 'Guides',
combineHref: true,
icon: 'book',
pages: 'auto'
}
]
});