svelte-doc-kit
v0.0.10
Published
A Documentation Kit based on SvelteKit
Downloads
22
Readme
svelte-doc-kit
A Documentation Kit based on SvelteKit
Usage
Put markdown docs in src/docs
folder
Use 00-
prefix to order files, prefix will be stripped from filenames to create slugs
Use full relative paths for internal links, prefixed will be stripped
Set title, description, icon, image etc... frontmatter in each page
Use meta.json
file to apply settings to folder (title, icon)
Add pre { tab-size: 2; }
to control tab size in code-blocks
Add files
+layout.server.ts
export { load } from 'svelte-doc-kit/layout.server'
export const prerender = true
+layout.svelte
<script lang="ts">
import Layout from 'svelte-doc-kit/Layout.svelte'
import '../app.postcss'
import 'highlight.js/styles/github-dark.css'
export let data
</script>
<Layout {data}>
<slot></slot>
</Layout>
[...slug]/+page.server.ts
export { load, entries } from 'svelte-doc-kit/page.server'
[...slug]/+page.svelte
<script lang="ts">
import Page from '$lib/Page.svelte'
export let data
</script>
<Page {data} />