@alliance-droid/svelte-docs-system 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COMPONENTS.md +365 -0
- package/COVERAGE_REPORT.md +663 -0
- package/README.md +42 -0
- package/SEARCH_VERIFICATION.md +229 -0
- package/TEST_SUMMARY.md +344 -0
- package/bin/init.js +821 -0
- package/docs/E2E_TESTS.md +354 -0
- package/docs/TESTING.md +754 -0
- package/docs/de/index.md +41 -0
- package/docs/en/COMPONENTS.md +443 -0
- package/docs/en/api/examples.md +100 -0
- package/docs/en/api/overview.md +69 -0
- package/docs/en/components/index.md +622 -0
- package/docs/en/config/navigation.md +505 -0
- package/docs/en/config/theme-and-colors.md +395 -0
- package/docs/en/getting-started/integration.md +406 -0
- package/docs/en/guides/common-setups.md +651 -0
- package/docs/en/index.md +243 -0
- package/docs/en/markdown.md +102 -0
- package/docs/en/routing.md +64 -0
- package/docs/en/setup.md +52 -0
- package/docs/en/troubleshooting.md +704 -0
- package/docs/es/index.md +41 -0
- package/docs/fr/index.md +41 -0
- package/docs/ja/index.md +41 -0
- package/package.json +40 -0
- package/pagefind.toml +8 -0
- package/postcss.config.js +5 -0
- package/src/app.css +119 -0
- package/src/app.d.ts +13 -0
- package/src/app.html +11 -0
- package/src/lib/assets/favicon.svg +1 -0
- package/src/lib/components/APITable.svelte +120 -0
- package/src/lib/components/APITable.test.ts +153 -0
- package/src/lib/components/Breadcrumbs.svelte +85 -0
- package/src/lib/components/Breadcrumbs.test.ts +148 -0
- package/src/lib/components/Callout.svelte +60 -0
- package/src/lib/components/Callout.test.ts +100 -0
- package/src/lib/components/CodeBlock.svelte +68 -0
- package/src/lib/components/CodeBlock.test.ts +133 -0
- package/src/lib/components/DocLayout.svelte +84 -0
- package/src/lib/components/Footer.svelte +78 -0
- package/src/lib/components/Image.svelte +100 -0
- package/src/lib/components/Image.test.ts +163 -0
- package/src/lib/components/Navbar.svelte +141 -0
- package/src/lib/components/Search.svelte +248 -0
- package/src/lib/components/Sidebar.svelte +110 -0
- package/src/lib/components/Tabs.svelte +48 -0
- package/src/lib/components/Tabs.test.ts +102 -0
- package/src/lib/config.test.ts +140 -0
- package/src/lib/config.ts +179 -0
- package/src/lib/configIntegration.test.ts +272 -0
- package/src/lib/configLoader.ts +231 -0
- package/src/lib/configParser.test.ts +217 -0
- package/src/lib/configParser.ts +234 -0
- package/src/lib/index.ts +34 -0
- package/src/lib/integration.test.ts +426 -0
- package/src/lib/navigationBuilder.test.ts +338 -0
- package/src/lib/navigationBuilder.ts +268 -0
- package/src/lib/performance.test.ts +369 -0
- package/src/lib/routing.test.ts +202 -0
- package/src/lib/routing.ts +127 -0
- package/src/lib/search-functionality.test.ts +493 -0
- package/src/lib/stores/i18n.test.ts +180 -0
- package/src/lib/stores/i18n.ts +143 -0
- package/src/lib/stores/nav.ts +36 -0
- package/src/lib/stores/search.test.ts +140 -0
- package/src/lib/stores/search.ts +162 -0
- package/src/lib/stores/theme.ts +59 -0
- package/src/lib/stores/version.test.ts +139 -0
- package/src/lib/stores/version.ts +111 -0
- package/src/lib/themeCustomization.test.ts +223 -0
- package/src/lib/themeCustomization.ts +212 -0
- package/src/lib/utils/highlight.test.ts +136 -0
- package/src/lib/utils/highlight.ts +100 -0
- package/src/lib/utils/index.ts +7 -0
- package/src/lib/utils/markdown.test.ts +357 -0
- package/src/lib/utils/markdown.ts +77 -0
- package/src/routes/+layout.server.ts +1 -0
- package/src/routes/+layout.svelte +28 -0
- package/src/routes/+page.svelte +165 -0
- package/static/robots.txt +3 -0
- package/svelte.config.js +18 -0
- package/tailwind.config.ts +55 -0
- package/template-starter/.github/workflows/build.yml +40 -0
- package/template-starter/.github/workflows/deploy-github-pages.yml +47 -0
- package/template-starter/.github/workflows/deploy-netlify.yml +41 -0
- package/template-starter/.github/workflows/deploy-vercel.yml +64 -0
- package/template-starter/NPM-PACKAGE-SETUP.md +233 -0
- package/template-starter/README.md +320 -0
- package/template-starter/docs/_config.json +39 -0
- package/template-starter/docs/api/components.md +257 -0
- package/template-starter/docs/api/overview.md +169 -0
- package/template-starter/docs/guides/configuration.md +145 -0
- package/template-starter/docs/guides/github-pages-deployment.md +254 -0
- package/template-starter/docs/guides/netlify-deployment.md +159 -0
- package/template-starter/docs/guides/vercel-deployment.md +131 -0
- package/template-starter/docs/index.md +49 -0
- package/template-starter/docs/setup.md +149 -0
- package/template-starter/package.json +31 -0
- package/template-starter/pagefind.toml +3 -0
- package/template-starter/postcss.config.js +5 -0
- package/template-starter/src/app.css +34 -0
- package/template-starter/src/app.d.ts +13 -0
- package/template-starter/src/app.html +11 -0
- package/template-starter/src/lib/components/APITable.svelte +120 -0
- package/template-starter/src/lib/components/APITable.test.ts +19 -0
- package/template-starter/src/lib/components/Breadcrumbs.svelte +85 -0
- package/template-starter/src/lib/components/Breadcrumbs.test.ts +19 -0
- package/template-starter/src/lib/components/Callout.svelte +60 -0
- package/template-starter/src/lib/components/Callout.test.ts +16 -0
- package/template-starter/src/lib/components/CodeBlock.svelte +68 -0
- package/template-starter/src/lib/components/CodeBlock.test.ts +12 -0
- package/template-starter/src/lib/components/DocLayout.svelte +84 -0
- package/template-starter/src/lib/components/Footer.svelte +78 -0
- package/template-starter/src/lib/components/Image.svelte +100 -0
- package/template-starter/src/lib/components/Image.test.ts +15 -0
- package/template-starter/src/lib/components/Navbar.svelte +141 -0
- package/template-starter/src/lib/components/Search.svelte +248 -0
- package/template-starter/src/lib/components/Sidebar.svelte +110 -0
- package/template-starter/src/lib/components/Tabs.svelte +48 -0
- package/template-starter/src/lib/components/Tabs.test.ts +17 -0
- package/template-starter/src/lib/index.ts +15 -0
- package/template-starter/src/routes/+layout.svelte +28 -0
- package/template-starter/src/routes/+page.svelte +92 -0
- package/template-starter/svelte.config.js +17 -0
- package/template-starter/tailwind.config.ts +17 -0
- package/template-starter/tsconfig.json +13 -0
- package/template-starter/vite.config.ts +6 -0
- package/tests/e2e/example.spec.ts +345 -0
- package/tsconfig.json +20 -0
- package/vite.config.ts +6 -0
- package/vitest.config.ts +34 -0
- package/vitest.setup.ts +21 -0
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Integration Guide
|
|
3
|
+
description: Add the SvelteKit Documentation System to an existing project
|
|
4
|
+
author: Andrew
|
|
5
|
+
date: 2026-02-05
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Integration Guide
|
|
9
|
+
|
|
10
|
+
Learn how to add the SvelteKit Documentation System to your existing SvelteKit project.
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
|
|
14
|
+
The SvelteKit Documentation System is designed to integrate seamlessly into existing SvelteKit applications. It provides:
|
|
15
|
+
|
|
16
|
+
- **Folder-based routing** - Markdown files automatically become routes
|
|
17
|
+
- **Professional theme** - Claude Code aesthetic with dark mode support
|
|
18
|
+
- **Zero configuration** - Works out of the box with sensible defaults
|
|
19
|
+
- **Highly customizable** - Adjust colors, layout, and behavior as needed
|
|
20
|
+
- **Configurable mount point** - Place docs at `/docs`, `/help`, `/guides`, or any route
|
|
21
|
+
|
|
22
|
+
## Prerequisites
|
|
23
|
+
|
|
24
|
+
- Existing SvelteKit project (v2.0+)
|
|
25
|
+
- Node.js 18+
|
|
26
|
+
- npm, pnpm, or yarn
|
|
27
|
+
|
|
28
|
+
## Step 1: Install Dependencies
|
|
29
|
+
|
|
30
|
+
First, ensure you have the required dependencies in your SvelteKit project:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The documentation system components are already included in your SvelteKit setup and use:
|
|
37
|
+
- Svelte 5 (with Runes)
|
|
38
|
+
- Tailwind CSS 4
|
|
39
|
+
- TypeScript
|
|
40
|
+
|
|
41
|
+
## Step 2: Create Docs Folder Structure
|
|
42
|
+
|
|
43
|
+
Create a `docs` folder in your project root with your markdown files:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
mkdir -p docs
|
|
47
|
+
mkdir -p docs/guides
|
|
48
|
+
mkdir -p docs/api
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Create your first documentation file:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
cat > docs/index.md << 'EOF'
|
|
55
|
+
---
|
|
56
|
+
title: Documentation Home
|
|
57
|
+
description: Welcome to our documentation
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
# Welcome to Our Documentation
|
|
61
|
+
|
|
62
|
+
This is the home page of your documentation site.
|
|
63
|
+
|
|
64
|
+
## Quick Links
|
|
65
|
+
|
|
66
|
+
- [Getting Started](/docs/getting-started)
|
|
67
|
+
- [API Reference](/docs/api)
|
|
68
|
+
- [Guides](/docs/guides)
|
|
69
|
+
EOF
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Step 3: Create Routes
|
|
73
|
+
|
|
74
|
+
Create the documentation routes in your SvelteKit app. Create `src/routes/docs/+layout.svelte`:
|
|
75
|
+
|
|
76
|
+
```svelte
|
|
77
|
+
<script lang="ts">
|
|
78
|
+
import DocLayout from '$lib/components/DocLayout.svelte';
|
|
79
|
+
import type { NavSection } from '$lib/stores/nav';
|
|
80
|
+
import { page } from '$app/stores';
|
|
81
|
+
|
|
82
|
+
const sections: NavSection[] = [
|
|
83
|
+
{
|
|
84
|
+
title: 'Getting Started',
|
|
85
|
+
items: [
|
|
86
|
+
{ label: 'Home', href: '/docs' },
|
|
87
|
+
{ label: 'Integration', href: '/docs/integration' },
|
|
88
|
+
{ label: 'Setup', href: '/docs/setup' },
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
title: 'Components',
|
|
93
|
+
items: [
|
|
94
|
+
{ label: 'Overview', href: '/docs/components' },
|
|
95
|
+
{ label: 'DocLayout', href: '/docs/components/doclayout' },
|
|
96
|
+
{ label: 'Navbar', href: '/docs/components/navbar' },
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
title: 'Configuration',
|
|
101
|
+
items: [
|
|
102
|
+
{ label: 'Theme Colors', href: '/docs/config/theme' },
|
|
103
|
+
{ label: 'Navigation', href: '/docs/config/navigation' },
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
];
|
|
107
|
+
|
|
108
|
+
let { children } = $props();
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<DocLayout
|
|
112
|
+
title="Documentation"
|
|
113
|
+
logo={null}
|
|
114
|
+
{sections}
|
|
115
|
+
copyright="© 2026 Your Project"
|
|
116
|
+
>
|
|
117
|
+
{@render children()}
|
|
118
|
+
</DocLayout>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Create `src/routes/docs/[...slug]/+page.svelte` for dynamic routing:
|
|
122
|
+
|
|
123
|
+
```svelte
|
|
124
|
+
<script lang="ts">
|
|
125
|
+
import { dev } from '$app/environment';
|
|
126
|
+
|
|
127
|
+
let markdown = '';
|
|
128
|
+
let metadata = {
|
|
129
|
+
title: 'Not Found',
|
|
130
|
+
description: '',
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export async function load({ params }) {
|
|
134
|
+
const slug = params.slug ? params.slug.join('/') : 'index';
|
|
135
|
+
const path = `/docs/${slug}.md`;
|
|
136
|
+
|
|
137
|
+
try {
|
|
138
|
+
const response = await fetch(path);
|
|
139
|
+
if (!response.ok) {
|
|
140
|
+
throw new Error('Not found');
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const content = await response.text();
|
|
144
|
+
const { metadata: meta, html } = parseMarkdown(content);
|
|
145
|
+
|
|
146
|
+
return {
|
|
147
|
+
metadata: meta,
|
|
148
|
+
html,
|
|
149
|
+
slug,
|
|
150
|
+
};
|
|
151
|
+
} catch (e) {
|
|
152
|
+
if (dev) console.error(e);
|
|
153
|
+
return {
|
|
154
|
+
status: 404,
|
|
155
|
+
error: new Error('Documentation page not found'),
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function parseMarkdown(content: string) {
|
|
161
|
+
// Simple frontmatter parser
|
|
162
|
+
const match = content.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);
|
|
163
|
+
const metadata: Record<string, string> = {};
|
|
164
|
+
|
|
165
|
+
if (match) {
|
|
166
|
+
const frontmatter = match[1];
|
|
167
|
+
const body = match[2];
|
|
168
|
+
|
|
169
|
+
frontmatter.split('\n').forEach((line) => {
|
|
170
|
+
const [key, ...valueParts] = line.split(': ');
|
|
171
|
+
if (key && valueParts.length) {
|
|
172
|
+
metadata[key.trim()] = valueParts.join(': ').trim();
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
return {
|
|
177
|
+
metadata,
|
|
178
|
+
html: `<article class="prose"><h1>${metadata.title}</h1>${body}</article>`,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return {
|
|
183
|
+
metadata: { title: 'Untitled' },
|
|
184
|
+
html: `<article class="prose">${content}</article>`,
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
</script>
|
|
188
|
+
|
|
189
|
+
<svelte:head>
|
|
190
|
+
<title>{metadata.title} | Docs</title>
|
|
191
|
+
<meta name="description" content={metadata.description} />
|
|
192
|
+
</svelte:head>
|
|
193
|
+
|
|
194
|
+
{@html html}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Step 4: Copy Components to Your Project
|
|
198
|
+
|
|
199
|
+
If not already present, copy the documentation components to your project:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
cp -r src/lib/components ~/your-project/src/lib/
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Ensure these components are available:
|
|
206
|
+
- `DocLayout.svelte`
|
|
207
|
+
- `Navbar.svelte`
|
|
208
|
+
- `Sidebar.svelte`
|
|
209
|
+
- `Footer.svelte`
|
|
210
|
+
- `Callout.svelte`
|
|
211
|
+
- `CodeBlock.svelte`
|
|
212
|
+
|
|
213
|
+
## Step 5: Configure Tailwind CSS
|
|
214
|
+
|
|
215
|
+
Ensure your `tailwind.config.ts` includes the Claude Code theme colors:
|
|
216
|
+
|
|
217
|
+
```typescript
|
|
218
|
+
import type { Config } from 'tailwindcss';
|
|
219
|
+
|
|
220
|
+
export default {
|
|
221
|
+
content: ['./src/**/*.{html,js,svelte,ts}'],
|
|
222
|
+
theme: {
|
|
223
|
+
extend: {
|
|
224
|
+
colors: {
|
|
225
|
+
'claude-bg': '#FFFFFF',
|
|
226
|
+
'claude-bg-secondary': '#F7F6F3',
|
|
227
|
+
'claude-text': '#1A1A1A',
|
|
228
|
+
'claude-text-secondary': '#565656',
|
|
229
|
+
'claude-border': '#ECECEC',
|
|
230
|
+
'claude-accent': '#0066CC',
|
|
231
|
+
'claude-accent-hover': '#0052A3',
|
|
232
|
+
'claude-dark-bg': '#1A1A1A',
|
|
233
|
+
'claude-dark-bg-secondary': '#2D2D2D',
|
|
234
|
+
'claude-dark-text': '#FFFFFF',
|
|
235
|
+
'claude-dark-text-secondary': '#B0B0B0',
|
|
236
|
+
'claude-dark-border': '#3A3A3A',
|
|
237
|
+
'claude-dark-accent': '#4D94FF',
|
|
238
|
+
'claude-dark-accent-hover': '#6BA3FF',
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
darkMode: 'class',
|
|
243
|
+
plugins: [],
|
|
244
|
+
} satisfies Config;
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## Step 6: Start Your Development Server
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
npm run dev
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
Visit `http://localhost:5173/docs` in your browser to see your documentation site!
|
|
254
|
+
|
|
255
|
+
## Configuring the Mount Point
|
|
256
|
+
|
|
257
|
+
By default, documentation is mounted at `/docs`. To use a different route (e.g., `/help` or `/guides`):
|
|
258
|
+
|
|
259
|
+
### Change the Route File Location
|
|
260
|
+
|
|
261
|
+
Instead of `src/routes/docs/`, create `src/routes/help/`:
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
mkdir -p src/routes/help
|
|
265
|
+
# Copy the files from docs to help
|
|
266
|
+
cp src/routes/docs/+layout.svelte src/routes/help/+layout.svelte
|
|
267
|
+
cp -r src/routes/docs/[...slug] src/routes/help/
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### Update Links in Layout
|
|
271
|
+
|
|
272
|
+
Update all href values in your layout from `/docs` to `/help`:
|
|
273
|
+
|
|
274
|
+
```svelte
|
|
275
|
+
const sections: NavSection[] = [
|
|
276
|
+
{
|
|
277
|
+
title: 'Getting Started',
|
|
278
|
+
items: [
|
|
279
|
+
{ label: 'Home', href: '/help' },
|
|
280
|
+
{ label: 'Setup', href: '/help/setup' },
|
|
281
|
+
],
|
|
282
|
+
},
|
|
283
|
+
];
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## Directory Structure After Integration
|
|
287
|
+
|
|
288
|
+
Your project should look like this:
|
|
289
|
+
|
|
290
|
+
```
|
|
291
|
+
your-project/
|
|
292
|
+
├── src/
|
|
293
|
+
│ ├── lib/
|
|
294
|
+
│ │ ├── components/ (Documentation components)
|
|
295
|
+
│ │ │ ├── DocLayout.svelte
|
|
296
|
+
│ │ │ ├── Navbar.svelte
|
|
297
|
+
│ │ │ └── ...
|
|
298
|
+
│ │ └── stores/ (Theme and nav stores)
|
|
299
|
+
│ │ ├── theme.ts
|
|
300
|
+
│ │ └── nav.ts
|
|
301
|
+
│ ├── routes/
|
|
302
|
+
│ │ ├── +layout.svelte (Your main layout)
|
|
303
|
+
│ │ ├── docs/ (Docs routes - NEW)
|
|
304
|
+
│ │ │ ├── +layout.svelte
|
|
305
|
+
│ │ │ └── [...slug]/
|
|
306
|
+
│ │ │ └── +page.svelte
|
|
307
|
+
│ │ ├── other-routes/ (Your existing routes)
|
|
308
|
+
│ │ └── ...
|
|
309
|
+
│ ├── app.css (Global styles with Tailwind)
|
|
310
|
+
│ └── app.svelte
|
|
311
|
+
├── docs/ (Markdown files - NEW)
|
|
312
|
+
│ ├── index.md
|
|
313
|
+
│ ├── setup.md
|
|
314
|
+
│ ├── api/
|
|
315
|
+
│ │ └── overview.md
|
|
316
|
+
│ └── guides/
|
|
317
|
+
│ └── getting-started.md
|
|
318
|
+
├── tailwind.config.ts
|
|
319
|
+
├── svelte.config.js
|
|
320
|
+
└── package.json
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
## Best Practices
|
|
324
|
+
|
|
325
|
+
### Organizing Your Documentation
|
|
326
|
+
|
|
327
|
+
```
|
|
328
|
+
docs/
|
|
329
|
+
├── index.md (Home/Introduction)
|
|
330
|
+
├── getting-started/
|
|
331
|
+
│ ├── index.md (Getting started overview)
|
|
332
|
+
│ ├── installation.md (Installation steps)
|
|
333
|
+
│ └── quick-start.md (Quick start guide)
|
|
334
|
+
├── guides/
|
|
335
|
+
│ ├── api-integration.md (API integration guide)
|
|
336
|
+
│ ├── theming.md (Theming guide)
|
|
337
|
+
│ └── deployment.md (Deployment guide)
|
|
338
|
+
├── api/
|
|
339
|
+
│ ├── index.md (API overview)
|
|
340
|
+
│ ├── components.md (Component reference)
|
|
341
|
+
│ └── stores.md (Store reference)
|
|
342
|
+
└── troubleshooting.md (Troubleshooting guide)
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### Markdown Files
|
|
346
|
+
|
|
347
|
+
Each markdown file should start with frontmatter:
|
|
348
|
+
|
|
349
|
+
```markdown
|
|
350
|
+
---
|
|
351
|
+
title: Your Page Title
|
|
352
|
+
description: Brief description for SEO
|
|
353
|
+
author: Your Name
|
|
354
|
+
date: 2026-02-05
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
# Your Page Title
|
|
358
|
+
|
|
359
|
+
Content goes here...
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### Linking Between Pages
|
|
363
|
+
|
|
364
|
+
Use relative paths for links:
|
|
365
|
+
|
|
366
|
+
```markdown
|
|
367
|
+
- [Getting Started](/docs/getting-started)
|
|
368
|
+
- [API Reference](/docs/api)
|
|
369
|
+
- [Troubleshooting](/docs/troubleshooting)
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
## Troubleshooting Integration
|
|
373
|
+
|
|
374
|
+
### Routes Not Working
|
|
375
|
+
|
|
376
|
+
**Problem:** Documentation pages return 404
|
|
377
|
+
|
|
378
|
+
**Solution:**
|
|
379
|
+
1. Ensure `docs/` folder exists in project root
|
|
380
|
+
2. Check file names match URLs (no spaces, use hyphens)
|
|
381
|
+
3. Verify `+layout.svelte` and `[...slug]/+page.svelte` are in `src/routes/docs/`
|
|
382
|
+
|
|
383
|
+
### Styling Not Applied
|
|
384
|
+
|
|
385
|
+
**Problem:** Pages appear unstyled
|
|
386
|
+
|
|
387
|
+
**Solution:**
|
|
388
|
+
1. Verify Tailwind CSS is configured in `tailwind.config.ts`
|
|
389
|
+
2. Ensure `src/app.css` includes `@tailwind` directives
|
|
390
|
+
3. Check that `DocLayout` component is imported in `+layout.svelte`
|
|
391
|
+
|
|
392
|
+
### Sidebar Not Showing Navigation
|
|
393
|
+
|
|
394
|
+
**Problem:** Sidebar appears empty
|
|
395
|
+
|
|
396
|
+
**Solution:**
|
|
397
|
+
1. Verify `sections` array is populated with navigation items
|
|
398
|
+
2. Check that `href` values start with your docs mount point (e.g., `/docs`)
|
|
399
|
+
3. Ensure `NavSection` and `NavItem` types match the store definitions
|
|
400
|
+
|
|
401
|
+
## Next Steps
|
|
402
|
+
|
|
403
|
+
- [Configure Theme Colors](/docs/config/theme)
|
|
404
|
+
- [Learn About Components](/docs/components)
|
|
405
|
+
- [Create Custom Navigation](/docs/config/navigation)
|
|
406
|
+
- [Deploy Your Docs](/docs/guides/deployment)
|