specra-cli 0.3.0

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 (172) hide show
  1. package/LICENSE.MD +33 -0
  2. package/README.md +246 -0
  3. package/dist/api-client-VHQARPDT.js +15 -0
  4. package/dist/api-client-VHQARPDT.js.map +1 -0
  5. package/dist/chunk-5765WX4D.js +192 -0
  6. package/dist/chunk-5765WX4D.js.map +1 -0
  7. package/dist/chunk-72RDEJR2.js +94 -0
  8. package/dist/chunk-72RDEJR2.js.map +1 -0
  9. package/dist/chunk-SQ2MMFUZ.js +102 -0
  10. package/dist/chunk-SQ2MMFUZ.js.map +1 -0
  11. package/dist/cli.d.ts +2 -0
  12. package/dist/cli.js +242 -0
  13. package/dist/cli.js.map +1 -0
  14. package/dist/deploy-V4JO2D6B.js +179 -0
  15. package/dist/deploy-V4JO2D6B.js.map +1 -0
  16. package/dist/doctor-ICALAJ4N.js +309 -0
  17. package/dist/doctor-ICALAJ4N.js.map +1 -0
  18. package/dist/login-UG3WU7DY.js +92 -0
  19. package/dist/login-UG3WU7DY.js.map +1 -0
  20. package/dist/logout-WJKHJZT6.js +24 -0
  21. package/dist/logout-WJKHJZT6.js.map +1 -0
  22. package/dist/logs-BLUJPWNO.js +77 -0
  23. package/dist/logs-BLUJPWNO.js.map +1 -0
  24. package/dist/projects-LJ57GK3D.js +49 -0
  25. package/dist/projects-LJ57GK3D.js.map +1 -0
  26. package/package.json +50 -0
  27. package/templates/book-docs/.env.sample +1 -0
  28. package/templates/book-docs/docs/v1.0.0/concepts.mdx +89 -0
  29. package/templates/book-docs/docs/v1.0.0/content/_category_.json +7 -0
  30. package/templates/book-docs/docs/v1.0.0/content/formatting.mdx +128 -0
  31. package/templates/book-docs/docs/v1.0.0/content/reusable-content.mdx +116 -0
  32. package/templates/book-docs/docs/v1.0.0/content/structure.mdx +92 -0
  33. package/templates/book-docs/docs/v1.0.0/customization/_category_.json +7 -0
  34. package/templates/book-docs/docs/v1.0.0/customization/branding.mdx +115 -0
  35. package/templates/book-docs/docs/v1.0.0/customization/themes.mdx +81 -0
  36. package/templates/book-docs/docs/v1.0.0/introduction.mdx +38 -0
  37. package/templates/book-docs/docs/v1.0.0/quickstart.mdx +112 -0
  38. package/templates/book-docs/docs/v2.0.0/concepts.mdx +89 -0
  39. package/templates/book-docs/docs/v2.0.0/content/_category_.json +7 -0
  40. package/templates/book-docs/docs/v2.0.0/content/formatting.mdx +128 -0
  41. package/templates/book-docs/docs/v2.0.0/content/reusable-content.mdx +116 -0
  42. package/templates/book-docs/docs/v2.0.0/content/structure.mdx +92 -0
  43. package/templates/book-docs/docs/v2.0.0/customization/_category_.json +7 -0
  44. package/templates/book-docs/docs/v2.0.0/customization/branding.mdx +115 -0
  45. package/templates/book-docs/docs/v2.0.0/customization/themes.mdx +81 -0
  46. package/templates/book-docs/docs/v2.0.0/introduction.mdx +39 -0
  47. package/templates/book-docs/docs/v2.0.0/quickstart.mdx +112 -0
  48. package/templates/book-docs/gitignore +7 -0
  49. package/templates/book-docs/package.json +28 -0
  50. package/templates/book-docs/postcss.config.mjs +8 -0
  51. package/templates/book-docs/public/api-specs/openapi-example.json +259 -0
  52. package/templates/book-docs/public/api-specs/postman-example.json +205 -0
  53. package/templates/book-docs/public/api-specs/test-api.json +256 -0
  54. package/templates/book-docs/public/api-specs/users-api.json +264 -0
  55. package/templates/book-docs/specra.config.json +77 -0
  56. package/templates/book-docs/src/app.css +86 -0
  57. package/templates/book-docs/src/app.html +17 -0
  58. package/templates/book-docs/src/params/product.ts +7 -0
  59. package/templates/book-docs/src/routes/+layout.server.ts +14 -0
  60. package/templates/book-docs/src/routes/+layout.svelte +21 -0
  61. package/templates/book-docs/src/routes/+page.server.ts +9 -0
  62. package/templates/book-docs/src/routes/docs/[product=product]/[version]/+layout.server.ts +40 -0
  63. package/templates/book-docs/src/routes/docs/[product=product]/[version]/+page.server.ts +24 -0
  64. package/templates/book-docs/src/routes/docs/[product=product]/[version]/[...slug]/+page.server.ts +131 -0
  65. package/templates/book-docs/src/routes/docs/[product=product]/[version]/[...slug]/+page.svelte +180 -0
  66. package/templates/book-docs/src/routes/docs/[version]/+layout.server.ts +42 -0
  67. package/templates/book-docs/src/routes/docs/[version]/+page.server.ts +27 -0
  68. package/templates/book-docs/src/routes/docs/[version]/[...slug]/+page.server.ts +106 -0
  69. package/templates/book-docs/src/routes/docs/[version]/[...slug]/+page.svelte +172 -0
  70. package/templates/book-docs/static/favicon.svg +4 -0
  71. package/templates/book-docs/svelte.config.js +13 -0
  72. package/templates/book-docs/tsconfig.json +12 -0
  73. package/templates/book-docs/vite.config.ts +6 -0
  74. package/templates/jbrains-docs/.env.sample +1 -0
  75. package/templates/jbrains-docs/docs/v1.0.0/advanced/_category_.json +8 -0
  76. package/templates/jbrains-docs/docs/v1.0.0/advanced/async.mdx +95 -0
  77. package/templates/jbrains-docs/docs/v1.0.0/advanced/generics.mdx +126 -0
  78. package/templates/jbrains-docs/docs/v1.0.0/basics/_category_.json +8 -0
  79. package/templates/jbrains-docs/docs/v1.0.0/basics/control-flow.mdx +106 -0
  80. package/templates/jbrains-docs/docs/v1.0.0/basics/syntax.mdx +129 -0
  81. package/templates/jbrains-docs/docs/v1.0.0/basics/types.mdx +135 -0
  82. package/templates/jbrains-docs/docs/v1.0.0/getting-started.mdx +111 -0
  83. package/templates/jbrains-docs/docs/v1.0.0/home.mdx +37 -0
  84. package/templates/jbrains-docs/docs/v1.0.0/tools/_category_.json +8 -0
  85. package/templates/jbrains-docs/docs/v1.0.0/tools/build-tools.mdx +165 -0
  86. package/templates/jbrains-docs/docs/v1.0.0/tools/testing.mdx +112 -0
  87. package/templates/jbrains-docs/docs/v2.0.0/advanced/_category_.json +8 -0
  88. package/templates/jbrains-docs/docs/v2.0.0/advanced/async.mdx +95 -0
  89. package/templates/jbrains-docs/docs/v2.0.0/advanced/generics.mdx +126 -0
  90. package/templates/jbrains-docs/docs/v2.0.0/basics/_category_.json +8 -0
  91. package/templates/jbrains-docs/docs/v2.0.0/basics/control-flow.mdx +106 -0
  92. package/templates/jbrains-docs/docs/v2.0.0/basics/syntax.mdx +129 -0
  93. package/templates/jbrains-docs/docs/v2.0.0/basics/types.mdx +135 -0
  94. package/templates/jbrains-docs/docs/v2.0.0/getting-started.mdx +111 -0
  95. package/templates/jbrains-docs/docs/v2.0.0/home.mdx +37 -0
  96. package/templates/jbrains-docs/docs/v2.0.0/tools/_category_.json +8 -0
  97. package/templates/jbrains-docs/docs/v2.0.0/tools/build-tools.mdx +165 -0
  98. package/templates/jbrains-docs/docs/v2.0.0/tools/testing.mdx +112 -0
  99. package/templates/jbrains-docs/gitignore +7 -0
  100. package/templates/jbrains-docs/package.json +28 -0
  101. package/templates/jbrains-docs/postcss.config.mjs +8 -0
  102. package/templates/jbrains-docs/public/api-specs/openapi-example.json +259 -0
  103. package/templates/jbrains-docs/public/api-specs/postman-example.json +205 -0
  104. package/templates/jbrains-docs/public/api-specs/test-api.json +256 -0
  105. package/templates/jbrains-docs/public/api-specs/users-api.json +264 -0
  106. package/templates/jbrains-docs/specra.config.json +80 -0
  107. package/templates/jbrains-docs/src/app.css +86 -0
  108. package/templates/jbrains-docs/src/app.html +17 -0
  109. package/templates/jbrains-docs/src/params/product.ts +7 -0
  110. package/templates/jbrains-docs/src/routes/+layout.server.ts +14 -0
  111. package/templates/jbrains-docs/src/routes/+layout.svelte +21 -0
  112. package/templates/jbrains-docs/src/routes/+page.server.ts +9 -0
  113. package/templates/jbrains-docs/src/routes/docs/[product=product]/[version]/+layout.server.ts +40 -0
  114. package/templates/jbrains-docs/src/routes/docs/[product=product]/[version]/+page.server.ts +24 -0
  115. package/templates/jbrains-docs/src/routes/docs/[product=product]/[version]/[...slug]/+page.server.ts +131 -0
  116. package/templates/jbrains-docs/src/routes/docs/[product=product]/[version]/[...slug]/+page.svelte +180 -0
  117. package/templates/jbrains-docs/src/routes/docs/[version]/+layout.server.ts +42 -0
  118. package/templates/jbrains-docs/src/routes/docs/[version]/+page.server.ts +27 -0
  119. package/templates/jbrains-docs/src/routes/docs/[version]/[...slug]/+page.server.ts +106 -0
  120. package/templates/jbrains-docs/src/routes/docs/[version]/[...slug]/+page.svelte +172 -0
  121. package/templates/jbrains-docs/static/favicon.svg +4 -0
  122. package/templates/jbrains-docs/svelte.config.js +13 -0
  123. package/templates/jbrains-docs/tsconfig.json +12 -0
  124. package/templates/jbrains-docs/vite.config.ts +6 -0
  125. package/templates/minimal/.env.sample +1 -0
  126. package/templates/minimal/docs/v1.0.0/about.mdx +57 -0
  127. package/templates/minimal/docs/v1.0.0/components/_category_.json +8 -0
  128. package/templates/minimal/docs/v1.0.0/components/callout.mdx +83 -0
  129. package/templates/minimal/docs/v1.0.0/components/code-block.mdx +103 -0
  130. package/templates/minimal/docs/v1.0.0/components/index.mdx +8 -0
  131. package/templates/minimal/docs/v1.0.0/components/tabs.mdx +92 -0
  132. package/templates/minimal/docs/v1.0.0/configuration.mdx +322 -0
  133. package/templates/minimal/docs/v1.0.0/features.mdx +197 -0
  134. package/templates/minimal/docs/v1.0.0/getting-started.mdx +183 -0
  135. package/templates/minimal/docs/v2.0.0/about.mdx +57 -0
  136. package/templates/minimal/docs/v2.0.0/components/_category_.json +8 -0
  137. package/templates/minimal/docs/v2.0.0/components/callout.mdx +83 -0
  138. package/templates/minimal/docs/v2.0.0/components/code-block.mdx +103 -0
  139. package/templates/minimal/docs/v2.0.0/components/index.mdx +8 -0
  140. package/templates/minimal/docs/v2.0.0/components/tabs.mdx +92 -0
  141. package/templates/minimal/docs/v2.0.0/configuration.mdx +322 -0
  142. package/templates/minimal/docs/v2.0.0/features.mdx +197 -0
  143. package/templates/minimal/docs/v2.0.0/getting-started.mdx +183 -0
  144. package/templates/minimal/gitignore +7 -0
  145. package/templates/minimal/package.json +29 -0
  146. package/templates/minimal/postcss.config.mjs +8 -0
  147. package/templates/minimal/specra.config.json +91 -0
  148. package/templates/minimal/src/app.css +86 -0
  149. package/templates/minimal/src/app.html +17 -0
  150. package/templates/minimal/src/hooks.server.ts +8 -0
  151. package/templates/minimal/src/params/product.ts +7 -0
  152. package/templates/minimal/src/routes/+error.svelte +10 -0
  153. package/templates/minimal/src/routes/+layout.server.ts +14 -0
  154. package/templates/minimal/src/routes/+layout.svelte +21 -0
  155. package/templates/minimal/src/routes/+page.server.ts +9 -0
  156. package/templates/minimal/src/routes/+page.svelte +149 -0
  157. package/templates/minimal/src/routes/docs/[product=product]/[version]/+layout.server.ts +40 -0
  158. package/templates/minimal/src/routes/docs/[product=product]/[version]/+page.server.ts +24 -0
  159. package/templates/minimal/src/routes/docs/[product=product]/[version]/[...slug]/+page.server.ts +131 -0
  160. package/templates/minimal/src/routes/docs/[product=product]/[version]/[...slug]/+page.svelte +180 -0
  161. package/templates/minimal/src/routes/docs/[version]/+layout.server.ts +42 -0
  162. package/templates/minimal/src/routes/docs/[version]/+page.server.ts +27 -0
  163. package/templates/minimal/src/routes/docs/[version]/[...slug]/+page.server.ts +106 -0
  164. package/templates/minimal/src/routes/docs/[version]/[...slug]/+page.svelte +172 -0
  165. package/templates/minimal/static/api-specs/openapi-example.json +259 -0
  166. package/templates/minimal/static/api-specs/postman-example.json +205 -0
  167. package/templates/minimal/static/api-specs/test-api.json +256 -0
  168. package/templates/minimal/static/api-specs/users-api.json +264 -0
  169. package/templates/minimal/static/favicon.svg +4 -0
  170. package/templates/minimal/svelte.config.js +13 -0
  171. package/templates/minimal/tsconfig.json +12 -0
  172. package/templates/minimal/vite.config.ts +6 -0
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "specra-cli",
3
+ "version": "0.3.0",
4
+ "description": "CLI tool to create, deploy, and manage Specra documentation sites",
5
+ "type": "module",
6
+ "bin": {
7
+ "specra": "./dist/cli.js"
8
+ },
9
+ "files": [
10
+ "dist",
11
+ "templates"
12
+ ],
13
+ "scripts": {
14
+ "build": "tsup",
15
+ "dev": "tsup --watch",
16
+ "typecheck": "tsc --noEmit"
17
+ },
18
+ "keywords": [
19
+ "documentation",
20
+ "docs",
21
+ "sveltekit",
22
+ "svelte",
23
+ "mdx",
24
+ "specra",
25
+ "cli"
26
+ ],
27
+ "author": "dalmasonto, arthur-kamau",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "https://github.com/SpecraDocs/specra-cli"
31
+ },
32
+ "homepage": "https://github.com/SpecraDocs",
33
+ "license": "SEE LICENSE IN LICENSE.MD",
34
+ "dependencies": {
35
+ "commander": "^12.1.0",
36
+ "open": "^11.0.0",
37
+ "ora": "^9.3.0",
38
+ "picocolors": "^1.1.1",
39
+ "prompts": "^2.4.2",
40
+ "tar": "^7.5.7",
41
+ "validate-npm-package-name": "^6.0.0"
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "^22",
45
+ "@types/prompts": "^2.4.9",
46
+ "@types/validate-npm-package-name": "^4.0.2",
47
+ "tsup": "^8.3.5",
48
+ "typescript": "^5"
49
+ }
50
+ }
@@ -0,0 +1 @@
1
+ SPECTRA_TOKEN=sk_xxx...
@@ -0,0 +1,89 @@
1
+ ---
2
+ title: Core Concepts
3
+ description: Understand the key ideas behind the documentation platform
4
+ sidebar_position: 3
5
+ icon: lightbulb
6
+ ---
7
+
8
+ Before diving into content creation, it helps to understand a few core concepts that shape how the platform works.
9
+
10
+ ## MDX
11
+
12
+ MDX is Markdown with components. You write standard Markdown and can embed rich, interactive components directly in your content.
13
+
14
+ ```mdx
15
+ # Regular Markdown
16
+
17
+ This is a paragraph with **bold** and *italic* text.
18
+
19
+ <Callout type="tip">
20
+ And this is an interactive component inside Markdown!
21
+ </Callout>
22
+ ```
23
+
24
+ <Callout type="info">
25
+ All documentation files use the `.mdx` extension, not `.md`.
26
+ </Callout>
27
+
28
+ ## Frontmatter
29
+
30
+ Every page starts with frontmatter — a YAML block at the top of the file that defines metadata:
31
+
32
+ ```mdx
33
+ ---
34
+ title: Page Title
35
+ description: A short description for SEO
36
+ sidebar_position: 1
37
+ icon: book
38
+ ---
39
+ ```
40
+
41
+ | Field | Required | Description |
42
+ |-------|----------|-------------|
43
+ | `title` | Yes | Page title shown in sidebar and browser tab |
44
+ | `description` | Recommended | Short description for search engines |
45
+ | `sidebar_position` | No | Controls order in sidebar (lower number = higher up) |
46
+ | `icon` | No | Lucide icon name for the sidebar |
47
+ | `tags` | No | Array of tags for categorization |
48
+
49
+ ## Versioning
50
+
51
+ Documentation is organized by version. Each version lives in its own folder:
52
+
53
+ ```txt
54
+ docs/
55
+ ├── v1.0.0/ # Stable release
56
+ ├── v2.0.0/ # Next major release
57
+ └── next/ # Development docs
58
+ ```
59
+
60
+ Users can switch between versions using the version selector in the header.
61
+
62
+ ## Sidebar Navigation
63
+
64
+ The sidebar is automatically generated from your folder structure. You control the order and appearance using:
65
+
66
+ - **`sidebar_position`** in frontmatter — sets page order
67
+ - **`_category_.json`** in folders — configures section labels and behavior
68
+
69
+ ```json
70
+ {
71
+ "label": "Getting Started",
72
+ "position": 1,
73
+ "collapsible": true,
74
+ "collapsed": false
75
+ }
76
+ ```
77
+
78
+ ## Components
79
+
80
+ The platform includes a library of built-in components that you can use without any imports:
81
+
82
+ <CardGrid cols={3}>
83
+ <Card icon="message-square" title="Callouts" description="Highlight important info" />
84
+ <Card icon="layers" title="Tabs" description="Tabbed content panels" />
85
+ <Card icon="list" title="Steps" description="Step-by-step guides" />
86
+ <Card icon="grid" title="Cards" description="Feature cards with icons" />
87
+ <Card icon="code" title="Code Blocks" description="Syntax-highlighted code" />
88
+ <Card icon="chevrons-up-down" title="Accordion" description="Collapsible sections" />
89
+ </CardGrid>
@@ -0,0 +1,7 @@
1
+ {
2
+ "label": "Content",
3
+ "position": 4,
4
+ "collapsible": true,
5
+ "collapsed": false,
6
+ "icon": "file-text"
7
+ }
@@ -0,0 +1,128 @@
1
+ ---
2
+ title: Formatting
3
+ description: Format your content with Markdown and components
4
+ sidebar_position: 1
5
+ ---
6
+
7
+ This guide covers the formatting options available for your documentation pages.
8
+
9
+ ## Text Formatting
10
+
11
+ Standard Markdown formatting is fully supported:
12
+
13
+ | Syntax | Output |
14
+ |--------|--------|
15
+ | `**bold**` | **bold** |
16
+ | `*italic*` | *italic* |
17
+ | `` `code` `` | `code` |
18
+ | `~~strikethrough~~` | ~~strikethrough~~ |
19
+
20
+ ## Headings
21
+
22
+ Use headings to structure your content. The table of contents on the right is generated from your headings.
23
+
24
+ ```markdown
25
+ ## Second Level
26
+ ### Third Level
27
+ #### Fourth Level
28
+ ```
29
+
30
+ <Callout type="tip">
31
+ Start with `##` (H2) in your content. The page title from frontmatter is rendered as H1 automatically.
32
+ </Callout>
33
+
34
+ ## Lists
35
+
36
+ ### Unordered Lists
37
+
38
+ ```markdown
39
+ - First item
40
+ - Second item
41
+ - Nested item
42
+ - Another nested item
43
+ - Third item
44
+ ```
45
+
46
+ - First item
47
+ - Second item
48
+ - Nested item
49
+ - Another nested item
50
+ - Third item
51
+
52
+ ### Ordered Lists
53
+
54
+ 1. First step
55
+ 2. Second step
56
+ 3. Third step
57
+
58
+ ## Code Blocks
59
+
60
+ Use fenced code blocks with a language identifier for syntax highlighting:
61
+
62
+ ```typescript
63
+ interface Config {
64
+ title: string;
65
+ theme: 'light' | 'dark' | 'system';
66
+ version: string;
67
+ }
68
+
69
+ function loadConfig(path: string): Config {
70
+ const raw = readFileSync(path, 'utf-8');
71
+ return JSON.parse(raw);
72
+ }
73
+ ```
74
+
75
+ ## Tables
76
+
77
+ ```markdown
78
+ | Feature | Status |
79
+ |---------|--------|
80
+ | Dark Mode | Supported |
81
+ | Search | Supported |
82
+ | i18n | Coming Soon |
83
+ ```
84
+
85
+ | Feature | Status |
86
+ |---------|--------|
87
+ | Dark Mode | Supported |
88
+ | Search | Supported |
89
+ | i18n | Coming Soon |
90
+
91
+ ## Callouts
92
+
93
+ Use callouts to draw attention to important information:
94
+
95
+ <Callout type="info">
96
+ Informational callouts provide additional context.
97
+ </Callout>
98
+
99
+ <Callout type="warning">
100
+ Warning callouts alert readers to potential issues.
101
+ </Callout>
102
+
103
+ <Callout type="tip">
104
+ Tip callouts suggest best practices or shortcuts.
105
+ </Callout>
106
+
107
+ ## Tabs
108
+
109
+ Use tabs to show alternative content side by side:
110
+
111
+ <Tabs defaultValue="JavaScript">
112
+ <Tab label="JavaScript">
113
+ ```javascript
114
+ console.log("Hello, world!");
115
+ ```
116
+ </Tab>
117
+ <Tab label="Python">
118
+ ```python
119
+ print("Hello, world!")
120
+ ```
121
+ </Tab>
122
+ </Tabs>
123
+
124
+ ## Links
125
+
126
+ - **Internal links**: `[Getting Started](/docs/v1.0.0/quickstart)`
127
+ - **External links**: `[GitHub](https://github.com)`
128
+ - **Anchor links**: `[See below](#callouts)`
@@ -0,0 +1,116 @@
1
+ ---
2
+ title: Reusable Content
3
+ description: Create reusable content blocks for consistent documentation
4
+ sidebar_position: 3
5
+ ---
6
+
7
+ Reusable content helps you maintain consistency across your documentation by defining content once and using it in multiple places.
8
+
9
+ ## Components as Reusable Blocks
10
+
11
+ The built-in component library provides reusable patterns for common documentation needs.
12
+
13
+ ### Card Grids
14
+
15
+ Use card grids to create consistent navigation sections across pages:
16
+
17
+ <CardGrid cols={3}>
18
+ <Card icon="zap" title="Fast" description="Optimized for speed" />
19
+ <Card icon="shield" title="Secure" description="Built with security in mind" />
20
+ <Card icon="code" title="Developer First" description="Great developer experience" />
21
+ </CardGrid>
22
+
23
+ ### Step-by-Step Patterns
24
+
25
+ Use the Steps component for consistent instructional content:
26
+
27
+ <Steps>
28
+ <Step title="Define the Content">
29
+ Write your content in MDX format with clear, concise language.
30
+ </Step>
31
+
32
+ <Step title="Add Components">
33
+ Enhance your content with interactive components like callouts, tabs, and cards.
34
+ </Step>
35
+
36
+ <Step title="Review and Publish">
37
+ Preview your changes locally, then commit and deploy.
38
+ </Step>
39
+ </Steps>
40
+
41
+ ## Consistent Callout Patterns
42
+
43
+ Use standardized callout types across your docs for a consistent reading experience:
44
+
45
+ <Callout type="info">
46
+ **Info callouts** provide supplementary context that helps readers understand a topic better.
47
+ </Callout>
48
+
49
+ <Callout type="warning">
50
+ **Warning callouts** alert readers about potential pitfalls or breaking changes.
51
+ </Callout>
52
+
53
+ <Callout type="tip">
54
+ **Tip callouts** share best practices and shortcuts that improve the reader's workflow.
55
+ </Callout>
56
+
57
+ ## Tabbed Content Patterns
58
+
59
+ Use tabs to provide content variations. Common patterns include:
60
+
61
+ ### Installation Instructions
62
+
63
+ <Tabs defaultValue="npm">
64
+ <Tab label="npm">
65
+ ```bash
66
+ npm install my-package
67
+ ```
68
+ </Tab>
69
+ <Tab label="yarn">
70
+ ```bash
71
+ yarn add my-package
72
+ ```
73
+ </Tab>
74
+ <Tab label="pnpm">
75
+ ```bash
76
+ pnpm add my-package
77
+ ```
78
+ </Tab>
79
+ </Tabs>
80
+
81
+ ### Language Examples
82
+
83
+ <Tabs defaultValue="TypeScript">
84
+ <Tab label="TypeScript">
85
+ ```typescript
86
+ const greeting: string = "Hello, world!";
87
+ console.log(greeting);
88
+ ```
89
+ </Tab>
90
+ <Tab label="Python">
91
+ ```python
92
+ greeting = "Hello, world!"
93
+ print(greeting)
94
+ ```
95
+ </Tab>
96
+ <Tab label="Go">
97
+ ```go
98
+ package main
99
+
100
+ import "fmt"
101
+
102
+ func main() {
103
+ fmt.Println("Hello, world!")
104
+ }
105
+ ```
106
+ </Tab>
107
+ </Tabs>
108
+
109
+ ## Best Practices
110
+
111
+ | Practice | Description |
112
+ |----------|-------------|
113
+ | **Use consistent types** | Always use the same callout type for the same kind of information |
114
+ | **Keep cards brief** | Card descriptions should be one short sentence |
115
+ | **Limit tab count** | Use 2-4 tabs per group for readability |
116
+ | **Name tabs clearly** | Tab labels should be short and descriptive |
@@ -0,0 +1,92 @@
1
+ ---
2
+ title: Content Structure
3
+ description: Organize your documentation with folders and categories
4
+ sidebar_position: 2
5
+ ---
6
+
7
+ Learn how to organize your documentation into a clear, navigable structure.
8
+
9
+ ## File Organization
10
+
11
+ Documentation files live in the `docs/` directory, grouped by version:
12
+
13
+ ```txt
14
+ docs/
15
+ ├── v1.0.0/
16
+ │ ├── introduction.mdx
17
+ │ ├── quickstart.mdx
18
+ │ ├── guides/
19
+ │ │ ├── _category_.json
20
+ │ │ ├── installation.mdx
21
+ │ │ └── deployment.mdx
22
+ │ └── reference/
23
+ │ ├── _category_.json
24
+ │ └── api.mdx
25
+ └── v2.0.0/
26
+ └── ...
27
+ ```
28
+
29
+ ## Categories
30
+
31
+ Folders become sidebar sections. Add a `_category_.json` file to configure each section:
32
+
33
+ ```json
34
+ {
35
+ "label": "Guides",
36
+ "position": 2,
37
+ "collapsible": true,
38
+ "collapsed": false,
39
+ "icon": "book-open"
40
+ }
41
+ ```
42
+
43
+ | Field | Description |
44
+ |-------|-------------|
45
+ | `label` | Display name in the sidebar |
46
+ | `position` | Order relative to other sections |
47
+ | `collapsible` | Whether the section can be collapsed |
48
+ | `collapsed` | Whether the section starts collapsed |
49
+ | `icon` | Lucide icon name |
50
+
51
+ ## Page Ordering
52
+
53
+ Pages within a section are ordered by their `sidebar_position` frontmatter value:
54
+
55
+ ```mdx
56
+ ---
57
+ title: First Page
58
+ sidebar_position: 1
59
+ ---
60
+ ```
61
+
62
+ <Callout type="info">
63
+ Pages without a `sidebar_position` are sorted alphabetically after positioned pages.
64
+ </Callout>
65
+
66
+ ## Index Pages
67
+
68
+ Create an `index.mdx` in a folder to provide a landing page for that section. When users click the section header in the sidebar, they'll see this page.
69
+
70
+ ```txt
71
+ guides/
72
+ ├── _category_.json
73
+ ├── index.mdx # Landing page for "Guides"
74
+ ├── installation.mdx
75
+ └── deployment.mdx
76
+ ```
77
+
78
+ ## Best Practices
79
+
80
+ <Steps>
81
+ <Step title="Keep It Flat">
82
+ Avoid deeply nested folders. Two levels of nesting is usually enough for most documentation sites.
83
+ </Step>
84
+
85
+ <Step title="Use Descriptive Names">
86
+ File names become URL slugs. Use lowercase, hyphenated names like `getting-started.mdx`.
87
+ </Step>
88
+
89
+ <Step title="Group Related Content">
90
+ Put related pages in the same folder. This makes the sidebar intuitive and keeps URLs predictable.
91
+ </Step>
92
+ </Steps>
@@ -0,0 +1,7 @@
1
+ {
2
+ "label": "Customization",
3
+ "position": 5,
4
+ "collapsible": true,
5
+ "collapsed": false,
6
+ "icon": "palette"
7
+ }
@@ -0,0 +1,115 @@
1
+ ---
2
+ title: Branding
3
+ description: Customize logos, site title, and brand identity
4
+ sidebar_position: 2
5
+ ---
6
+
7
+ Make the documentation site match your brand by customizing the title, description, social links, and footer.
8
+
9
+ ## Site Identity
10
+
11
+ Configure basic site information in `specra.config.json`:
12
+
13
+ ```json
14
+ {
15
+ "site": {
16
+ "title": "My Project Docs",
17
+ "description": "Official documentation for My Project",
18
+ "url": "https://docs.myproject.com",
19
+ "organizationName": "My Organization",
20
+ "projectName": "my-project"
21
+ }
22
+ }
23
+ ```
24
+
25
+ | Field | Description |
26
+ |-------|-------------|
27
+ | `title` | Displayed in the header and browser tab |
28
+ | `description` | Used for SEO meta tags |
29
+ | `url` | Full URL where docs are hosted |
30
+ | `organizationName` | Your company or organization name |
31
+ | `projectName` | Project identifier |
32
+
33
+ ## Social Links
34
+
35
+ Add links to your social profiles and repositories:
36
+
37
+ ```json
38
+ {
39
+ "social": {
40
+ "github": "https://github.com/your-org/your-repo",
41
+ "twitter": "https://twitter.com/yourhandle",
42
+ "discord": "https://discord.gg/yourserver"
43
+ }
44
+ }
45
+ ```
46
+
47
+ Social links appear as icons in the site header.
48
+
49
+ ## Footer
50
+
51
+ Customize the footer with copyright text and link columns:
52
+
53
+ ```json
54
+ {
55
+ "footer": {
56
+ "copyright": "Copyright © 2025 My Organization. All rights reserved.",
57
+ "branding": {
58
+ "showBranding": true
59
+ },
60
+ "links": [
61
+ {
62
+ "title": "Documentation",
63
+ "items": [
64
+ { "label": "Getting Started", "href": "/docs/v1.0.0/quickstart" },
65
+ { "label": "Concepts", "href": "/docs/v1.0.0/concepts" }
66
+ ]
67
+ },
68
+ {
69
+ "title": "Community",
70
+ "items": [
71
+ { "label": "GitHub", "href": "https://github.com/your-org" }
72
+ ]
73
+ }
74
+ ]
75
+ }
76
+ }
77
+ ```
78
+
79
+ <Callout type="info">
80
+ The footer supports multiple link columns. Each column has a title and a list of labeled links.
81
+ </Callout>
82
+
83
+ ## Banner
84
+
85
+ Display a site-wide announcement banner:
86
+
87
+ ```json
88
+ {
89
+ "banner": {
90
+ "enabled": true,
91
+ "message": "We just launched v2.0 — check out what's new!",
92
+ "type": "info",
93
+ "dismissible": true
94
+ }
95
+ }
96
+ ```
97
+
98
+ | Option | Type | Description |
99
+ |--------|------|-------------|
100
+ | `enabled` | `boolean` | Show or hide the banner |
101
+ | `message` | `string` | Banner text content |
102
+ | `type` | `"info" \| "warning" \| "error"` | Visual style |
103
+ | `dismissible` | `boolean` | Allow users to close the banner |
104
+
105
+ ## Favicon
106
+
107
+ Place your favicon file in the `public/` directory and reference it in `src/app.html`:
108
+
109
+ ```html
110
+ <link rel="icon" href="%sveltekit.assets%/favicon.svg" type="image/svg+xml" />
111
+ ```
112
+
113
+ <Callout type="tip">
114
+ Use SVG favicons for crisp rendering at any size and automatic dark mode support.
115
+ </Callout>
@@ -0,0 +1,81 @@
1
+ ---
2
+ title: Themes
3
+ description: Configure the look and feel of your documentation site
4
+ sidebar_position: 1
5
+ ---
6
+
7
+ The platform supports light and dark themes out of the box, with full control over which mode is used by default.
8
+
9
+ ## Theme Modes
10
+
11
+ Three theme modes are available:
12
+
13
+ | Mode | Description |
14
+ |------|-------------|
15
+ | `light` | Always use the light theme |
16
+ | `dark` | Always use the dark theme |
17
+ | `system` | Follow the user's operating system preference |
18
+
19
+ ## Configuration
20
+
21
+ Set the default theme in `specra.config.json`:
22
+
23
+ ```json
24
+ {
25
+ "theme": {
26
+ "defaultMode": "dark",
27
+ "respectPrefersColorScheme": true
28
+ }
29
+ }
30
+ ```
31
+
32
+ | Option | Type | Default | Description |
33
+ |--------|------|---------|-------------|
34
+ | `defaultMode` | `"light" \| "dark" \| "system"` | `"system"` | Initial theme mode |
35
+ | `respectPrefersColorScheme` | `boolean` | `true` | Whether to detect and follow OS preference |
36
+
37
+ <Callout type="info">
38
+ When `respectPrefersColorScheme` is `true` and `defaultMode` is `"system"`, the site automatically switches themes when the user changes their OS appearance settings.
39
+ </Callout>
40
+
41
+ ## Theme Toggle
42
+
43
+ Users can switch themes using the toggle button in the site header. Their preference is saved in local storage and persists across visits.
44
+
45
+ ## Customizing Colors
46
+
47
+ All colors are defined as CSS custom properties, making them easy to override:
48
+
49
+ ```css
50
+ :root {
51
+ --primary: oklch(0.55 0.22 264.376);
52
+ --background: oklch(1 0 0);
53
+ --foreground: oklch(0.145 0 0);
54
+ }
55
+
56
+ .dark {
57
+ --primary: oklch(0.65 0.22 264.376);
58
+ --background: oklch(0.145 0 0);
59
+ --foreground: oklch(0.95 0 0);
60
+ }
61
+ ```
62
+
63
+ <Callout type="tip">
64
+ Use the OKLCH color space for perceptually uniform color adjustments. This ensures colors look consistent across light and dark themes.
65
+ </Callout>
66
+
67
+ ## Best Practices
68
+
69
+ <Steps>
70
+ <Step title="Choose a Default">
71
+ Pick a default theme that matches your brand. For developer documentation, dark mode is often preferred.
72
+ </Step>
73
+
74
+ <Step title="Test Both Themes">
75
+ Always preview your content in both light and dark modes. Ensure images, diagrams, and code blocks are readable in both.
76
+ </Step>
77
+
78
+ <Step title="Respect User Preference">
79
+ Keep `respectPrefersColorScheme` enabled so users get the theme they expect.
80
+ </Step>
81
+ </Steps>