@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.
Files changed (134) hide show
  1. package/COMPONENTS.md +365 -0
  2. package/COVERAGE_REPORT.md +663 -0
  3. package/README.md +42 -0
  4. package/SEARCH_VERIFICATION.md +229 -0
  5. package/TEST_SUMMARY.md +344 -0
  6. package/bin/init.js +821 -0
  7. package/docs/E2E_TESTS.md +354 -0
  8. package/docs/TESTING.md +754 -0
  9. package/docs/de/index.md +41 -0
  10. package/docs/en/COMPONENTS.md +443 -0
  11. package/docs/en/api/examples.md +100 -0
  12. package/docs/en/api/overview.md +69 -0
  13. package/docs/en/components/index.md +622 -0
  14. package/docs/en/config/navigation.md +505 -0
  15. package/docs/en/config/theme-and-colors.md +395 -0
  16. package/docs/en/getting-started/integration.md +406 -0
  17. package/docs/en/guides/common-setups.md +651 -0
  18. package/docs/en/index.md +243 -0
  19. package/docs/en/markdown.md +102 -0
  20. package/docs/en/routing.md +64 -0
  21. package/docs/en/setup.md +52 -0
  22. package/docs/en/troubleshooting.md +704 -0
  23. package/docs/es/index.md +41 -0
  24. package/docs/fr/index.md +41 -0
  25. package/docs/ja/index.md +41 -0
  26. package/package.json +40 -0
  27. package/pagefind.toml +8 -0
  28. package/postcss.config.js +5 -0
  29. package/src/app.css +119 -0
  30. package/src/app.d.ts +13 -0
  31. package/src/app.html +11 -0
  32. package/src/lib/assets/favicon.svg +1 -0
  33. package/src/lib/components/APITable.svelte +120 -0
  34. package/src/lib/components/APITable.test.ts +153 -0
  35. package/src/lib/components/Breadcrumbs.svelte +85 -0
  36. package/src/lib/components/Breadcrumbs.test.ts +148 -0
  37. package/src/lib/components/Callout.svelte +60 -0
  38. package/src/lib/components/Callout.test.ts +100 -0
  39. package/src/lib/components/CodeBlock.svelte +68 -0
  40. package/src/lib/components/CodeBlock.test.ts +133 -0
  41. package/src/lib/components/DocLayout.svelte +84 -0
  42. package/src/lib/components/Footer.svelte +78 -0
  43. package/src/lib/components/Image.svelte +100 -0
  44. package/src/lib/components/Image.test.ts +163 -0
  45. package/src/lib/components/Navbar.svelte +141 -0
  46. package/src/lib/components/Search.svelte +248 -0
  47. package/src/lib/components/Sidebar.svelte +110 -0
  48. package/src/lib/components/Tabs.svelte +48 -0
  49. package/src/lib/components/Tabs.test.ts +102 -0
  50. package/src/lib/config.test.ts +140 -0
  51. package/src/lib/config.ts +179 -0
  52. package/src/lib/configIntegration.test.ts +272 -0
  53. package/src/lib/configLoader.ts +231 -0
  54. package/src/lib/configParser.test.ts +217 -0
  55. package/src/lib/configParser.ts +234 -0
  56. package/src/lib/index.ts +34 -0
  57. package/src/lib/integration.test.ts +426 -0
  58. package/src/lib/navigationBuilder.test.ts +338 -0
  59. package/src/lib/navigationBuilder.ts +268 -0
  60. package/src/lib/performance.test.ts +369 -0
  61. package/src/lib/routing.test.ts +202 -0
  62. package/src/lib/routing.ts +127 -0
  63. package/src/lib/search-functionality.test.ts +493 -0
  64. package/src/lib/stores/i18n.test.ts +180 -0
  65. package/src/lib/stores/i18n.ts +143 -0
  66. package/src/lib/stores/nav.ts +36 -0
  67. package/src/lib/stores/search.test.ts +140 -0
  68. package/src/lib/stores/search.ts +162 -0
  69. package/src/lib/stores/theme.ts +59 -0
  70. package/src/lib/stores/version.test.ts +139 -0
  71. package/src/lib/stores/version.ts +111 -0
  72. package/src/lib/themeCustomization.test.ts +223 -0
  73. package/src/lib/themeCustomization.ts +212 -0
  74. package/src/lib/utils/highlight.test.ts +136 -0
  75. package/src/lib/utils/highlight.ts +100 -0
  76. package/src/lib/utils/index.ts +7 -0
  77. package/src/lib/utils/markdown.test.ts +357 -0
  78. package/src/lib/utils/markdown.ts +77 -0
  79. package/src/routes/+layout.server.ts +1 -0
  80. package/src/routes/+layout.svelte +28 -0
  81. package/src/routes/+page.svelte +165 -0
  82. package/static/robots.txt +3 -0
  83. package/svelte.config.js +18 -0
  84. package/tailwind.config.ts +55 -0
  85. package/template-starter/.github/workflows/build.yml +40 -0
  86. package/template-starter/.github/workflows/deploy-github-pages.yml +47 -0
  87. package/template-starter/.github/workflows/deploy-netlify.yml +41 -0
  88. package/template-starter/.github/workflows/deploy-vercel.yml +64 -0
  89. package/template-starter/NPM-PACKAGE-SETUP.md +233 -0
  90. package/template-starter/README.md +320 -0
  91. package/template-starter/docs/_config.json +39 -0
  92. package/template-starter/docs/api/components.md +257 -0
  93. package/template-starter/docs/api/overview.md +169 -0
  94. package/template-starter/docs/guides/configuration.md +145 -0
  95. package/template-starter/docs/guides/github-pages-deployment.md +254 -0
  96. package/template-starter/docs/guides/netlify-deployment.md +159 -0
  97. package/template-starter/docs/guides/vercel-deployment.md +131 -0
  98. package/template-starter/docs/index.md +49 -0
  99. package/template-starter/docs/setup.md +149 -0
  100. package/template-starter/package.json +31 -0
  101. package/template-starter/pagefind.toml +3 -0
  102. package/template-starter/postcss.config.js +5 -0
  103. package/template-starter/src/app.css +34 -0
  104. package/template-starter/src/app.d.ts +13 -0
  105. package/template-starter/src/app.html +11 -0
  106. package/template-starter/src/lib/components/APITable.svelte +120 -0
  107. package/template-starter/src/lib/components/APITable.test.ts +19 -0
  108. package/template-starter/src/lib/components/Breadcrumbs.svelte +85 -0
  109. package/template-starter/src/lib/components/Breadcrumbs.test.ts +19 -0
  110. package/template-starter/src/lib/components/Callout.svelte +60 -0
  111. package/template-starter/src/lib/components/Callout.test.ts +16 -0
  112. package/template-starter/src/lib/components/CodeBlock.svelte +68 -0
  113. package/template-starter/src/lib/components/CodeBlock.test.ts +12 -0
  114. package/template-starter/src/lib/components/DocLayout.svelte +84 -0
  115. package/template-starter/src/lib/components/Footer.svelte +78 -0
  116. package/template-starter/src/lib/components/Image.svelte +100 -0
  117. package/template-starter/src/lib/components/Image.test.ts +15 -0
  118. package/template-starter/src/lib/components/Navbar.svelte +141 -0
  119. package/template-starter/src/lib/components/Search.svelte +248 -0
  120. package/template-starter/src/lib/components/Sidebar.svelte +110 -0
  121. package/template-starter/src/lib/components/Tabs.svelte +48 -0
  122. package/template-starter/src/lib/components/Tabs.test.ts +17 -0
  123. package/template-starter/src/lib/index.ts +15 -0
  124. package/template-starter/src/routes/+layout.svelte +28 -0
  125. package/template-starter/src/routes/+page.svelte +92 -0
  126. package/template-starter/svelte.config.js +17 -0
  127. package/template-starter/tailwind.config.ts +17 -0
  128. package/template-starter/tsconfig.json +13 -0
  129. package/template-starter/vite.config.ts +6 -0
  130. package/tests/e2e/example.spec.ts +345 -0
  131. package/tsconfig.json +20 -0
  132. package/vite.config.ts +6 -0
  133. package/vitest.config.ts +34 -0
  134. package/vitest.setup.ts +21 -0
@@ -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` |
@@ -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)