@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
package/docs/en/index.md
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Documentation Home
|
|
3
|
+
description: Complete guide to the SvelteKit Documentation System
|
|
4
|
+
author: Andrew
|
|
5
|
+
date: 2026-02-05
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# SvelteKit Documentation System
|
|
9
|
+
|
|
10
|
+
Welcome to the complete documentation for the SvelteKit Documentation System. This is a production-ready documentation platform built with SvelteKit and Svelte 5.
|
|
11
|
+
|
|
12
|
+
## Quick Start
|
|
13
|
+
|
|
14
|
+
Get your documentation site running in minutes:
|
|
15
|
+
|
|
16
|
+
1. **[Integration Guide](/docs/getting-started/integration)** - Add to your existing SvelteKit project
|
|
17
|
+
2. **[Setup Guide](/docs/setup)** - Initial setup and configuration
|
|
18
|
+
3. **[Component Reference](/docs/components)** - All available components with examples
|
|
19
|
+
|
|
20
|
+
## Key Features
|
|
21
|
+
|
|
22
|
+
- ✅ **Folder-based routing** - Markdown files become routes automatically
|
|
23
|
+
- ✅ **Professional theme** - Claude Code aesthetic with dark mode
|
|
24
|
+
- ✅ **Responsive design** - Mobile, tablet, and desktop support
|
|
25
|
+
- ✅ **Full-text search** - Find content instantly (Pagefind)
|
|
26
|
+
- ✅ **Dark mode** - Automatic theme switching
|
|
27
|
+
- ✅ **Production-ready** - Built with SvelteKit and Svelte 5
|
|
28
|
+
- ✅ **Highly customizable** - Colors, layout, components
|
|
29
|
+
|
|
30
|
+
## Documentation Structure
|
|
31
|
+
|
|
32
|
+
### Getting Started
|
|
33
|
+
|
|
34
|
+
Learn how to integrate the documentation system into your project:
|
|
35
|
+
- [Integration Guide](/docs/getting-started/integration) - Add to existing SvelteKit projects
|
|
36
|
+
- [Setup](/docs/setup) - Initial configuration
|
|
37
|
+
|
|
38
|
+
### Core Concepts
|
|
39
|
+
|
|
40
|
+
Understand how the system works:
|
|
41
|
+
- [Routing](/docs/routing) - How markdown maps to routes
|
|
42
|
+
- [Markdown Features](/docs/markdown) - Supported markdown syntax
|
|
43
|
+
|
|
44
|
+
### Configuration
|
|
45
|
+
|
|
46
|
+
Customize your documentation:
|
|
47
|
+
- [Theme & Colors](/docs/config/theme-and-colors) - Change colors and appearance
|
|
48
|
+
- [Navigation](/docs/config/navigation) - Organize sidebar and navbar
|
|
49
|
+
|
|
50
|
+
### Components
|
|
51
|
+
|
|
52
|
+
Use and customize components:
|
|
53
|
+
- [Components Reference](/docs/components) - All 6 core components
|
|
54
|
+
- [Component Props](/docs/components) - Detailed prop documentation
|
|
55
|
+
- [Examples](/docs/components) - Copy-paste examples
|
|
56
|
+
|
|
57
|
+
### Guides
|
|
58
|
+
|
|
59
|
+
Learn common patterns:
|
|
60
|
+
- [Common Setup Patterns](/docs/guides/common-setups) - API docs, product docs, blogs
|
|
61
|
+
- [API Documentation](/docs/guides/common-setups#1-api-documentation-site)
|
|
62
|
+
- [Product Documentation](/docs/guides/common-setups#2-product-documentation)
|
|
63
|
+
- [Blog/Content Site](/docs/guides/common-setups#3-blogcontent-site)
|
|
64
|
+
- [Multi-Language Docs](/docs/guides/common-setups#4-multi-language-documentation)
|
|
65
|
+
- [Open Source Docs](/docs/guides/common-setups#5-open-source-project-documentation)
|
|
66
|
+
|
|
67
|
+
### Troubleshooting
|
|
68
|
+
|
|
69
|
+
Solutions to common problems:
|
|
70
|
+
- [Troubleshooting Guide](/docs/troubleshooting) - Fix common issues
|
|
71
|
+
- [Build Issues](/docs/troubleshooting#build--development-issues)
|
|
72
|
+
- [Routing Issues](/docs/troubleshooting#routing--navigation-issues)
|
|
73
|
+
- [Styling Issues](/docs/troubleshooting#styling--theme-issues)
|
|
74
|
+
- [Performance Issues](/docs/troubleshooting#performance-issues)
|
|
75
|
+
|
|
76
|
+
## What's Included
|
|
77
|
+
|
|
78
|
+
### 6 Core Components
|
|
79
|
+
|
|
80
|
+
1. **DocLayout** - Main wrapper orchestrating theme, navbar, sidebar, footer
|
|
81
|
+
2. **Navbar** - Header with logo, theme toggle, version/language selectors
|
|
82
|
+
3. **Sidebar** - Responsive navigation with nested items and active states
|
|
83
|
+
4. **Footer** - Multi-column footer with links and social media
|
|
84
|
+
5. **Callout** - Alert boxes (info, warning, success, error)
|
|
85
|
+
6. **Breadcrumbs** - Current page path navigation
|
|
86
|
+
|
|
87
|
+
### Additional Components
|
|
88
|
+
|
|
89
|
+
- **CodeBlock** - Syntax highlighted code with copy button
|
|
90
|
+
- **Tabs** - Tabbed content interface
|
|
91
|
+
- **Image** - Responsive images with captions
|
|
92
|
+
- **APITable** - API reference tables
|
|
93
|
+
- **Search** - Full-text search interface
|
|
94
|
+
|
|
95
|
+
### Stores
|
|
96
|
+
|
|
97
|
+
- **theme** - Light/dark mode management
|
|
98
|
+
- **nav** - Navigation structure and sidebar state
|
|
99
|
+
|
|
100
|
+
## For Different Use Cases
|
|
101
|
+
|
|
102
|
+
### Building API Documentation?
|
|
103
|
+
Start with [API Documentation Pattern](/docs/guides/common-setups#1-api-documentation-site)
|
|
104
|
+
|
|
105
|
+
### Building Product Documentation?
|
|
106
|
+
Start with [Product Documentation Pattern](/docs/guides/common-setups#2-product-documentation)
|
|
107
|
+
|
|
108
|
+
### Building a Blog?
|
|
109
|
+
Start with [Blog Pattern](/docs/guides/common-setups#3-blogcontent-site)
|
|
110
|
+
|
|
111
|
+
### Supporting Multiple Languages?
|
|
112
|
+
Start with [Multi-Language Pattern](/docs/guides/common-setups#4-multi-language-documentation)
|
|
113
|
+
|
|
114
|
+
### Building Open Source Docs?
|
|
115
|
+
Start with [Open Source Pattern](/docs/guides/common-setups#5-open-source-project-documentation)
|
|
116
|
+
|
|
117
|
+
## Technology Stack
|
|
118
|
+
|
|
119
|
+
- **Framework:** SvelteKit 2.x with Svelte 5
|
|
120
|
+
- **Styling:** Tailwind CSS 4
|
|
121
|
+
- **Search:** Pagefind
|
|
122
|
+
- **Build Tool:** Vite
|
|
123
|
+
- **Language:** TypeScript
|
|
124
|
+
- **Testing:** Vitest
|
|
125
|
+
|
|
126
|
+
## File Structure
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
your-project/
|
|
130
|
+
├── src/
|
|
131
|
+
│ ├── lib/
|
|
132
|
+
│ │ ├── components/ # DocLayout, Navbar, Sidebar, Footer, etc.
|
|
133
|
+
│ │ └── stores/ # theme, nav stores
|
|
134
|
+
│ ├── routes/
|
|
135
|
+
│ │ └── docs/ # Documentation routes
|
|
136
|
+
│ │ ├── +layout.svelte
|
|
137
|
+
│ │ └── [...slug]/+page.svelte
|
|
138
|
+
│ └── app.css # Tailwind CSS
|
|
139
|
+
├── docs/ # Your markdown files
|
|
140
|
+
│ ├── index.md
|
|
141
|
+
│ ├── setup.md
|
|
142
|
+
│ ├── api/
|
|
143
|
+
│ │ └── overview.md
|
|
144
|
+
│ └── guides/
|
|
145
|
+
│ └── getting-started.md
|
|
146
|
+
├── tailwind.config.ts
|
|
147
|
+
└── svelte.config.js
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Integration in 5 Steps
|
|
151
|
+
|
|
152
|
+
1. **Create docs folder** - `mkdir docs`
|
|
153
|
+
2. **Create route handlers** - Copy `src/routes/docs/` files
|
|
154
|
+
3. **Write markdown** - Create `.md` files in `docs/`
|
|
155
|
+
4. **Configure navigation** - Define sidebar sections
|
|
156
|
+
5. **Customize theme** - Edit `tailwind.config.ts` colors (optional)
|
|
157
|
+
|
|
158
|
+
[See full integration guide →](/docs/getting-started/integration)
|
|
159
|
+
|
|
160
|
+
## Next Steps
|
|
161
|
+
|
|
162
|
+
👉 **Start here:** [Integration Guide](/docs/getting-started/integration)
|
|
163
|
+
📖 **Learn components:** [Components Reference](/docs/components)
|
|
164
|
+
🎨 **Customize theme:** [Theme Configuration](/docs/config/theme-and-colors)
|
|
165
|
+
🧭 **Setup navigation:** [Navigation Configuration](/docs/config/navigation)
|
|
166
|
+
❓ **Need help?** [Troubleshooting Guide](/docs/troubleshooting)
|
|
167
|
+
|
|
168
|
+
## Examples
|
|
169
|
+
|
|
170
|
+
### Basic Documentation Site
|
|
171
|
+
```
|
|
172
|
+
docs/
|
|
173
|
+
├── index.md
|
|
174
|
+
├── getting-started.md
|
|
175
|
+
├── installation.md
|
|
176
|
+
├── api/
|
|
177
|
+
│ ├── overview.md
|
|
178
|
+
│ └── reference.md
|
|
179
|
+
└── faq.md
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Complex Documentation Site (with sections)
|
|
183
|
+
```
|
|
184
|
+
docs/
|
|
185
|
+
├── index.md
|
|
186
|
+
├── getting-started/
|
|
187
|
+
│ ├── index.md
|
|
188
|
+
│ ├── installation.md
|
|
189
|
+
│ └── configuration.md
|
|
190
|
+
├── guides/
|
|
191
|
+
│ ├── integration.md
|
|
192
|
+
│ ├── theming.md
|
|
193
|
+
│ └── deployment.md
|
|
194
|
+
├── api/
|
|
195
|
+
│ ├── overview.md
|
|
196
|
+
│ ├── endpoints.md
|
|
197
|
+
│ └── errors.md
|
|
198
|
+
└── troubleshooting.md
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## Features in Action
|
|
202
|
+
|
|
203
|
+
### Automatic Routing
|
|
204
|
+
```
|
|
205
|
+
docs/setup.md → /docs/setup
|
|
206
|
+
docs/api/endpoints.md → /docs/api/endpoints
|
|
207
|
+
docs/guides/integration.md → /docs/guides/integration
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Dark Mode
|
|
211
|
+
Click the sun/moon icon in the navbar to toggle dark mode. Your preference is saved locally.
|
|
212
|
+
|
|
213
|
+
### Responsive Sidebar
|
|
214
|
+
On mobile, click the hamburger menu to show/hide the navigation sidebar. It automatically closes when you navigate.
|
|
215
|
+
|
|
216
|
+
### Search
|
|
217
|
+
Full-text search powered by Pagefind. Just start typing in the search box.
|
|
218
|
+
|
|
219
|
+
### Active Navigation
|
|
220
|
+
The current page is highlighted in the sidebar. Breadcrumbs show your location.
|
|
221
|
+
|
|
222
|
+
## Community & Support
|
|
223
|
+
|
|
224
|
+
- **GitHub:** [Report issues](https://github.com/andrew-org/svelte-docs-system)
|
|
225
|
+
- **Discussions:** Ask questions in GitHub Discussions
|
|
226
|
+
- **Contributing:** See contributing guide for how to help
|
|
227
|
+
|
|
228
|
+
## Version History
|
|
229
|
+
|
|
230
|
+
**v1.0.0** (February 2026)
|
|
231
|
+
- Initial release with 6 core components
|
|
232
|
+
- Full dark mode support
|
|
233
|
+
- Responsive design
|
|
234
|
+
- Search integration
|
|
235
|
+
- Theme customization
|
|
236
|
+
|
|
237
|
+
[See all features →](/docs/components)
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
**Ready to get started?** [→ Integration Guide](/docs/getting-started/integration)
|
|
242
|
+
|
|
243
|
+
Questions? Check the [Troubleshooting Guide](/docs/troubleshooting) or see [Common Setup Patterns](/docs/guides/common-setups) for your use case.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Markdown Features
|
|
3
|
+
description: What markdown features are supported
|
|
4
|
+
author: Andrew
|
|
5
|
+
date: 2026-02-05
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Markdown Features
|
|
9
|
+
|
|
10
|
+
The documentation system supports full markdown syntax with frontmatter metadata.
|
|
11
|
+
|
|
12
|
+
## Frontmatter
|
|
13
|
+
|
|
14
|
+
Add metadata to the top of your markdown files:
|
|
15
|
+
|
|
16
|
+
```yaml
|
|
17
|
+
---
|
|
18
|
+
title: Page Title
|
|
19
|
+
description: Short description for SEO
|
|
20
|
+
author: Your Name
|
|
21
|
+
date: 2026-02-05
|
|
22
|
+
---
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Supported fields:
|
|
26
|
+
- `title` - Page title (appears in browser tab)
|
|
27
|
+
- `description` - SEO description
|
|
28
|
+
- `author` - Author name
|
|
29
|
+
- `date` - Publication date
|
|
30
|
+
- Custom fields - Add any key-value pairs you need
|
|
31
|
+
|
|
32
|
+
## Text Formatting
|
|
33
|
+
|
|
34
|
+
**Bold text** and *italic text* work as expected.
|
|
35
|
+
|
|
36
|
+
You can also use `inline code` in your text.
|
|
37
|
+
|
|
38
|
+
## Headings
|
|
39
|
+
|
|
40
|
+
# Heading 1
|
|
41
|
+
## Heading 2
|
|
42
|
+
### Heading 3
|
|
43
|
+
|
|
44
|
+
## Code Blocks
|
|
45
|
+
|
|
46
|
+
Python example:
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
def hello_world():
|
|
50
|
+
print("Hello, World!")
|
|
51
|
+
|
|
52
|
+
hello_world()
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
JavaScript:
|
|
56
|
+
|
|
57
|
+
```javascript
|
|
58
|
+
function helloWorld() {
|
|
59
|
+
console.log('Hello, World!');
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
helloWorld();
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Lists
|
|
66
|
+
|
|
67
|
+
Unordered lists:
|
|
68
|
+
- Item 1
|
|
69
|
+
- Item 2
|
|
70
|
+
- Item 3
|
|
71
|
+
|
|
72
|
+
Ordered lists:
|
|
73
|
+
1. First
|
|
74
|
+
2. Second
|
|
75
|
+
3. Third
|
|
76
|
+
|
|
77
|
+
## Blockquotes
|
|
78
|
+
|
|
79
|
+
> This is a blockquote. It can contain multiple lines
|
|
80
|
+
> and emphasize important information.
|
|
81
|
+
|
|
82
|
+
> **Note:** Blockquotes are great for warnings and tips!
|
|
83
|
+
|
|
84
|
+
## Tables
|
|
85
|
+
|
|
86
|
+
| Feature | Status | Notes |
|
|
87
|
+
|---------|--------|-------|
|
|
88
|
+
| Routing | ✅ Done | Automatic from file structure |
|
|
89
|
+
| Markdown | ✅ Done | Full syntax support |
|
|
90
|
+
| Styling | ✅ Done | Professional default theme |
|
|
91
|
+
|
|
92
|
+
## Links
|
|
93
|
+
|
|
94
|
+
[Link to setup guide](/docs/setup)
|
|
95
|
+
|
|
96
|
+
[External link](https://github.com)
|
|
97
|
+
|
|
98
|
+
## Horizontal Rule
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
This is useful for separating sections.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Routing System
|
|
3
|
+
description: Understanding automatic routing
|
|
4
|
+
author: Andrew
|
|
5
|
+
date: 2026-02-05
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Routing System
|
|
9
|
+
|
|
10
|
+
The documentation system automatically creates routes from your markdown file structure.
|
|
11
|
+
|
|
12
|
+
## How It Works
|
|
13
|
+
|
|
14
|
+
1. **Folder scanning** reads all `.md` files in the `docs/` folder
|
|
15
|
+
2. **Path mapping** converts file paths to URL slugs
|
|
16
|
+
3. **Dynamic routing** serves the right markdown file for each URL
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
### Single-level files
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
docs/
|
|
24
|
+
├── index.md → /docs
|
|
25
|
+
├── setup.md → /docs/setup
|
|
26
|
+
├── faq.md → /docs/faq
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Nested files
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
docs/
|
|
33
|
+
├── api/
|
|
34
|
+
│ ├── index.md → /docs/api
|
|
35
|
+
│ ├── overview.md → /docs/api/overview
|
|
36
|
+
│ └── reference.md → /docs/api/reference
|
|
37
|
+
│
|
|
38
|
+
├── guides/
|
|
39
|
+
│ ├── getting-started.md → /docs/guides/getting-started
|
|
40
|
+
│ └── advanced.md → /docs/guides/advanced
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Key Features
|
|
44
|
+
|
|
45
|
+
- **No configuration needed** - just add markdown files
|
|
46
|
+
- **Deep nesting** - organize with unlimited folder levels
|
|
47
|
+
- **Index files** - `api/index.md` becomes `/docs/api`
|
|
48
|
+
- **Slugs from filenames** - `my-guide.md` becomes `/docs/my-guide`
|
|
49
|
+
|
|
50
|
+
## Special Files
|
|
51
|
+
|
|
52
|
+
Files starting with underscore (`_`) are ignored:
|
|
53
|
+
- `_config.json` - Reserved for navigation config
|
|
54
|
+
- `_layout.svelte` - Reserved for custom layouts
|
|
55
|
+
|
|
56
|
+
## Slug Generation Rules
|
|
57
|
+
|
|
58
|
+
| File Path | URL Slug |
|
|
59
|
+
|-----------|----------|
|
|
60
|
+
| `index.md` | `/docs` |
|
|
61
|
+
| `setup.md` | `/docs/setup` |
|
|
62
|
+
| `api/overview.md` | `/docs/api/overview` |
|
|
63
|
+
| `api/index.md` | `/docs/api` |
|
|
64
|
+
| `guides/advanced.md` | `/docs/guides/advanced` |
|
package/docs/en/setup.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Setup Guide
|
|
3
|
+
description: Get started with the documentation system
|
|
4
|
+
author: Andrew
|
|
5
|
+
date: 2026-02-05
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Setup Guide
|
|
9
|
+
|
|
10
|
+
This guide will walk you through setting up the documentation system.
|
|
11
|
+
|
|
12
|
+
## Prerequisites
|
|
13
|
+
|
|
14
|
+
- Node.js 18 or higher
|
|
15
|
+
- npm, pnpm, or yarn
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
1. Clone the repository
|
|
20
|
+
2. Install dependencies:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
3. Start the development server:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm run dev
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
4. Open [http://localhost:5173/docs](http://localhost:5173/docs) in your browser
|
|
33
|
+
|
|
34
|
+
## Project Structure
|
|
35
|
+
|
|
36
|
+
The documentation system uses a simple folder structure:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
docs/
|
|
40
|
+
├── index.md → /docs
|
|
41
|
+
├── setup.md → /docs/setup
|
|
42
|
+
├── api/
|
|
43
|
+
│ └── overview.md → /docs/api/overview
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Just create markdown files and they automatically become routes!
|
|
47
|
+
|
|
48
|
+
## Next Steps
|
|
49
|
+
|
|
50
|
+
- Learn about [Routing](/docs/routing)
|
|
51
|
+
- Check out [Markdown Features](/docs/markdown)
|
|
52
|
+
- Explore [API Examples](/docs/api/overview)
|