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
@@ -0,0 +1,57 @@
1
+ ---
2
+ title: About Specra
3
+ sidebar_position: 1
4
+ icon: info
5
+ ---
6
+
7
+ Specra is a self-hosted, Mintlify-quality documentation platform built with **SvelteKit**, **MDX**, and **Tailwind CSS**. It provides a polished, readable docs experience with powerful features for both readers and writers.
8
+
9
+ ## Why Specra?
10
+
11
+ <CardGrid cols={2}>
12
+ <Card icon="zap" title="Fast & Static" description="Pre-rendered pages with edge caching for lightning-fast load times" />
13
+ <Card icon="search" title="Instant Search" description="Meilisearch-powered full-text search with typo tolerance" />
14
+ <Card icon="git-branch" title="Versioned Docs" description="Multiple documentation versions under /docs/v1.0.0/, /docs/v2.0.0/" />
15
+ <Card icon="palette" title="Theme Support" description="Dark mode, customizable colors, and design tokens" />
16
+ </CardGrid>
17
+
18
+ ## Built With
19
+
20
+ - **SvelteKit** - Svelte framework with file-based routing
21
+ - **MDX** - Markdown with Svelte components
22
+ - **Tailwind CSS** - Utility-first styling
23
+ - **Meilisearch** - Fast, typo-tolerant search
24
+ - **TypeScript** - Full type safety
25
+
26
+ ## Core Principles
27
+
28
+ <Steps>
29
+ <Step title="Content First">
30
+ Your documentation lives in the `docs/` folder as MDX files. The system handles routing, navigation, and rendering automatically.
31
+ </Step>
32
+
33
+ <Step title="Developer Experience">
34
+ Edit MDX files, and see changes instantly with hot reload. No complex configuration required.
35
+ </Step>
36
+
37
+ <Step title="Production Ready">
38
+ Built-in SEO, accessibility, performance optimization, and CI/CD integration.
39
+ </Step>
40
+ </Steps>
41
+
42
+ ## What's Included
43
+
44
+ | Feature | Description |
45
+ |---------|-------------|
46
+ | **MDX Components** | Callouts, tabs, code blocks, cards, accordions, and more |
47
+ | **Sidebar Navigation** | Auto-generated from folder structure with collapsible groups |
48
+ | **Table of Contents** | Auto-generated from headings with scroll tracking |
49
+ | **Version Switcher** | Switch between documentation versions |
50
+ | **Search** | Full-text search with keyboard shortcuts (⌘K) |
51
+ | **Dark Mode** | System-aware theme with manual toggle |
52
+ | **Reading Time** | Automatic reading time estimation |
53
+ | **Responsive** | Mobile-first design that works on all devices |
54
+
55
+ ## Getting Started
56
+
57
+ Ready to write documentation? Head to the [Getting Started](/docs/v1.0.0/getting-started) guide.
@@ -0,0 +1,8 @@
1
+ {
2
+ "label": "Components",
3
+ "position": 2,
4
+ "collapsible": true,
5
+ "collapsed": false,
6
+ "icon": "grid",
7
+ "tab_group": "components"
8
+ }
@@ -0,0 +1,83 @@
1
+ ---
2
+ title: Callout
3
+ description: Highlight important information with styled callout boxes
4
+ sidebar_position: 4
5
+ ---
6
+
7
+ Callouts draw attention to important information within your content. They're styled based on the type of message they convey.
8
+
9
+ ## Usage
10
+
11
+ ```mdx
12
+ <Callout type="info">
13
+ This is helpful information for the reader.
14
+ </Callout>
15
+ ```
16
+
17
+ ## Types
18
+
19
+ ### Info
20
+ <Callout type="info">
21
+ This provides additional context or helpful tips.
22
+ </Callout>
23
+
24
+ ```mdx
25
+ <Callout type="info">
26
+ Helpful additional context goes here.
27
+ </Callout>
28
+ ```
29
+
30
+ ### Note
31
+ <Callout type="note">
32
+ Notes highlight important information the reader should be aware of.
33
+ </Callout>
34
+
35
+ ### Tip
36
+ <Callout type="tip">
37
+ Tips provide suggestions for better usage or best practices.
38
+ </Callout>
39
+
40
+ ### Warning
41
+ <Callout type="warning">
42
+ Warnings alert users to potential issues or breaking changes.
43
+ </Callout>
44
+
45
+ ### Success
46
+ <Callout type="success">
47
+ Success callouts confirm positive outcomes or completed actions.
48
+ </Callout>
49
+
50
+ ### Error
51
+ <Callout type="error">
52
+ Error callouts highlight critical issues or things to avoid.
53
+ </Callout>
54
+
55
+ ### Danger
56
+ <Callout type="danger">
57
+ Danger callouts warn about potentially destructive actions.
58
+ </Callout>
59
+
60
+ ## Props
61
+
62
+ | Prop | Type | Default | Description |
63
+ |------|------|---------|-------------|
64
+ | `children` | `ReactNode` | required | Callout content |
65
+ | `type` | `"info" \| "note" \| "tip" \| "warning" \| "success" \| "error" \| "danger"` | `"info"` | Callout style |
66
+
67
+ ## GitHub-Style Alerts
68
+
69
+ You can also use markdown blockquotes with alert markers:
70
+
71
+ ```mdx
72
+ > [!INFO]
73
+ > This is an info alert using markdown syntax.
74
+
75
+ > [!WARNING]
76
+ > This is a warning using markdown syntax.
77
+ ```
78
+
79
+ > [!INFO]
80
+ > This is an info alert using markdown syntax.
81
+
82
+ > [!WARNING]
83
+ > This is a warning alert using markdown syntax.
@@ -0,0 +1,103 @@
1
+ ---
2
+ title: Code Block
3
+ description: Display syntax-highlighted code with line numbers and copy functionality
4
+ sidebar_position: 6
5
+ ---
6
+
7
+ Code blocks display syntax-highlighted code with line numbers, a copy button, and optional filename headers.
8
+
9
+ ## Usage
10
+
11
+ Code blocks are automatically created when using fenced code blocks with a language specifier:
12
+
13
+ ````mdx
14
+ ```javascript
15
+ const greeting = "Hello, World!";
16
+ console.log(greeting);
17
+ ```
18
+ ````
19
+
20
+ ## Live Examples
21
+
22
+ ### JavaScript
23
+
24
+ ```javascript
25
+ function fibonacci(n) {
26
+ if (n <= 1) return n;
27
+ return fibonacci(n - 1) + fibonacci(n - 2);
28
+ }
29
+
30
+ console.log(fibonacci(10)); // 55
31
+ ```
32
+
33
+ ### TypeScript
34
+
35
+ ```typescript
36
+ interface User {
37
+ id: string;
38
+ name: string;
39
+ email: string;
40
+ }
41
+
42
+ function greetUser(user: User): string {
43
+ return `Hello, ${user.name}!`;
44
+ }
45
+ ```
46
+
47
+ ### Python
48
+
49
+ ```python
50
+ def quicksort(arr):
51
+ if len(arr) <= 1:
52
+ return arr
53
+ pivot = arr[len(arr) // 2]
54
+ left = [x for x in arr if x < pivot]
55
+ middle = [x for x in arr if x == pivot]
56
+ right = [x for x in arr if x > pivot]
57
+ return quicksort(left) + middle + quicksort(right)
58
+ ```
59
+
60
+ ### Bash
61
+
62
+ ```bash
63
+ # Install dependencies
64
+ npm install
65
+
66
+ # Start development server
67
+ npm run dev
68
+ ```
69
+
70
+ ### JSON
71
+
72
+ ```json
73
+ {
74
+ "name": "my-project",
75
+ "version": "1.0.0",
76
+ "dependencies": {
77
+ "react": "^19.0.0",
78
+ "next": "^16.0.0"
79
+ }
80
+ }
81
+ ```
82
+
83
+ ## Features
84
+
85
+ <Callout type="info">
86
+ Code blocks include automatic syntax highlighting for many languages including JavaScript, TypeScript, Python, Bash, JSON, CSS, and more.
87
+ </Callout>
88
+
89
+ - **Syntax Highlighting** - Automatic language detection and highlighting
90
+ - **Line Numbers** - Easy reference for specific lines
91
+ - **Copy Button** - One-click code copying
92
+ - **Filename Header** - Optional filename display
93
+
94
+ ## Supported Languages
95
+
96
+ Common languages include:
97
+ - `javascript`, `typescript`, `jsx`, `tsx`
98
+ - `python`, `ruby`, `go`, `rust`
99
+ - `bash`, `shell`, `powershell`
100
+ - `html`, `css`, `scss`
101
+ - `json`, `yaml`, `toml`
102
+ - `sql`, `graphql`
103
+ - `markdown`, `mdx`
@@ -0,0 +1,8 @@
1
+ ---
2
+ title: Components
3
+ description: A comprehensive guide to all available components
4
+ ---
5
+
6
+ ### A list of over 10 useful components
7
+
8
+ Welcome to the components documentation. Here you'll find information about all the reusable components available in this documentation system.
@@ -0,0 +1,92 @@
1
+ ---
2
+ title: Tabs
3
+ description: Organize content into tabbed sections
4
+ sidebar_position: 15
5
+ ---
6
+
7
+ Tabs organize content into switchable panels, perfect for showing alternatives like different package managers or language examples.
8
+
9
+ ## Usage
10
+
11
+ ```mdx
12
+ <Tabs defaultValue="npm">
13
+ <Tab label="npm">
14
+ npm content here
15
+ </Tab>
16
+
17
+ <Tab label="yarn">
18
+ yarn content here
19
+ </Tab>
20
+
21
+ <Tab label="pnpm">
22
+ pnpm content here
23
+ </Tab>
24
+ </Tabs>
25
+ ```
26
+
27
+ ## Live Examples
28
+
29
+ ### Package Manager Selection
30
+
31
+ <Tabs defaultValue="npm">
32
+ <Tab label="npm">
33
+ ```bash
34
+ npm install my-package
35
+ ```
36
+ </Tab>
37
+
38
+ <Tab label="yarn">
39
+ ```bash
40
+ yarn add my-package
41
+ ```
42
+ </Tab>
43
+
44
+ <Tab label="pnpm">
45
+ ```bash
46
+ pnpm add my-package
47
+ ```
48
+ </Tab>
49
+ </Tabs>
50
+
51
+ ### Code Examples
52
+
53
+ <Tabs defaultValue="JavaScript">
54
+ <Tab label="JavaScript">
55
+ ```javascript
56
+ function greet(name) {
57
+ return `Hello, ${name}!`;
58
+ }
59
+ ```
60
+ </Tab>
61
+
62
+ <Tab label="TypeScript">
63
+ ```typescript
64
+ function greet(name: string): string {
65
+ return `Hello, ${name}!`;
66
+ }
67
+ ```
68
+ </Tab>
69
+
70
+ <Tab label="Python">
71
+ ```python
72
+ def greet(name):
73
+ return f"Hello, {name}!"
74
+ ```
75
+ </Tab>
76
+ </Tabs>
77
+
78
+ ## Props
79
+
80
+ ### Tabs
81
+
82
+ | Prop | Type | Default | Description |
83
+ |------|------|---------|-------------|
84
+ | `children` | `ReactNode` | required | Tab components |
85
+ | `defaultValue` | `string` | - | Label of initially selected tab (defaults to first tab) |
86
+
87
+ ### Tab
88
+
89
+ | Prop | Type | Default | Description |
90
+ |------|------|---------|-------------|
91
+ | `label` | `string` | required | Tab button label |
92
+ | `children` | `ReactNode` | required | Content shown when tab is active |
@@ -0,0 +1,322 @@
1
+ ---
2
+ title: Configuration
3
+ description: Configure your Specra documentation site with specra.config.json
4
+ sidebar_position: 3
5
+ icon: cog
6
+ tab_group: guides
7
+ ---
8
+
9
+ Specra uses a centralized configuration file `specra.config.json` at the project root to manage all settings.
10
+
11
+ ## Complete Configuration Example
12
+
13
+ Here's a complete example showing all available configuration options:
14
+
15
+ ```json
16
+ {
17
+ "$schema": "./lib/config.types.ts",
18
+ "site": {
19
+ "title": "Documentation Library",
20
+ "description": "Comprehensive documentation for your project",
21
+ "url": "https://your-docs.com",
22
+ "baseUrl": "/",
23
+ "language": "en",
24
+ "organizationName": "Your Organization",
25
+ "projectName": "your-project",
26
+ "activeVersion": "v1.0.0",
27
+ "favicon": "/icon-light-32x32.png"
28
+ },
29
+ "theme": {
30
+ "defaultMode": "system",
31
+ "respectPrefersColorScheme": true
32
+ },
33
+ "navigation": {
34
+ "showSidebar": true,
35
+ "collapsibleSidebar": true,
36
+ "showBreadcrumbs": true,
37
+ "showTableOfContents": true,
38
+ "tocPosition": "right",
39
+ "tocMaxDepth": 3,
40
+ "tabGroups": [
41
+ {
42
+ "id": "guides",
43
+ "label": "Guides",
44
+ "icon": "book-open"
45
+ },
46
+ {
47
+ "id": "api",
48
+ "label": "API Reference",
49
+ "icon": "zap"
50
+ }
51
+ ]
52
+ },
53
+ "social": {
54
+ "github": "https://github.com/your-org/your-repo",
55
+ "twitter": "https://twitter.com/your-handle",
56
+ "discord": "https://discord.gg/your-server",
57
+ "custom": [
58
+ {
59
+ "label": "Website",
60
+ "href": "https://yourwebsite.com"
61
+ }
62
+ ]
63
+ },
64
+ "search": {
65
+ "enabled": true,
66
+ "placeholder": "Search documentation...",
67
+ "provider": "meilisearch",
68
+ "meilisearch": {
69
+ "host": "http://localhost:7700",
70
+ "apiKey": "your-api-key",
71
+ "indexName": "docs"
72
+ }
73
+ },
74
+ "analytics": {
75
+ "googleAnalytics": "G-XXXXXXXXXX",
76
+ "plausible": "your-domain.com"
77
+ },
78
+ "footer": {
79
+ "copyright": "Copyright © 2024 Your Organization. All rights reserved.",
80
+ "links": [
81
+ {
82
+ "title": "Documentation",
83
+ "items": [
84
+ {
85
+ "label": "Getting Started",
86
+ "href": "/docs/v1.0.0/getting-started"
87
+ },
88
+ {
89
+ "label": "API Reference",
90
+ "href": "/docs/v1.0.0/api-overview"
91
+ }
92
+ ]
93
+ },
94
+ {
95
+ "title": "Community",
96
+ "items": [
97
+ {
98
+ "label": "GitHub",
99
+ "href": "https://github.com/your-org/your-repo"
100
+ },
101
+ {
102
+ "label": "Discord",
103
+ "href": "https://discord.gg/your-server"
104
+ }
105
+ ]
106
+ }
107
+ ]
108
+ },
109
+ "banner": {
110
+ "enabled": true,
111
+ "message": "�� Version 2.0 is now available!",
112
+ "type": "info",
113
+ "dismissible": true
114
+ },
115
+ "features": {
116
+ "editUrl": "https://github.com/your-org/your-repo/edit/main/docs",
117
+ "showLastUpdated": true,
118
+ "showReadingTime": true,
119
+ "showAuthors": false,
120
+ "showTags": true,
121
+ "versioning": true,
122
+ "i18n": false
123
+ },
124
+ "env": {
125
+ "API_BASE_URL": "https://api.example.com",
126
+ "API_VERSION": "v1",
127
+ "CDN_URL": "https://cdn.example.com"
128
+ },
129
+ "deployment": {
130
+ "target": "vercel",
131
+ "basePath": "",
132
+ "customDomain": false
133
+ }
134
+ }
135
+ ```
136
+
137
+ <Callout type="tip">
138
+ Copy this complete configuration as a starting point and customize it for your needs.
139
+ </Callout>
140
+
141
+ ## Site Configuration
142
+
143
+ Core metadata and branding for your documentation site.
144
+
145
+ | Option | Type | Description |
146
+ |--------|------|-------------|
147
+ | `title` | string | Site title (shown in header and browser tab) |
148
+ | `description` | string | Meta description for SEO |
149
+ | `url` | string | Full URL where docs are hosted |
150
+ | `baseUrl` | string | Base path (default: `/`) |
151
+ | `language` | string | Language code (default: `en`) |
152
+ | `activeVersion` | string | Default documentation version |
153
+ | `organizationName` | string | Your organization name |
154
+ | `projectName` | string | Project name |
155
+
156
+ ## Theme Configuration
157
+
158
+ Control the appearance and color scheme.
159
+
160
+ ```json
161
+ {
162
+ "theme": {
163
+ "defaultMode": "system",
164
+ "respectPrefersColorScheme": true
165
+ }
166
+ }
167
+ ```
168
+
169
+ | Option | Type | Description |
170
+ |--------|------|-------------|
171
+ | `defaultMode` | `"light" \| "dark" \| "system"` | Default theme mode |
172
+ | `respectPrefersColorScheme` | boolean | Follow system theme preference |
173
+
174
+ ## Navigation Configuration
175
+
176
+ Control sidebar, breadcrumbs, and table of contents.
177
+
178
+ ```json
179
+ {
180
+ "navigation": {
181
+ "showSidebar": true,
182
+ "collapsibleSidebar": true,
183
+ "showBreadcrumbs": true,
184
+ "showTableOfContents": true,
185
+ "tocPosition": "right",
186
+ "tocMaxDepth": 3
187
+ }
188
+ }
189
+ ```
190
+
191
+ | Option | Type | Description |
192
+ |--------|------|-------------|
193
+ | `showSidebar` | boolean | Show/hide the sidebar |
194
+ | `collapsibleSidebar` | boolean | Allow sections to collapse |
195
+ | `showBreadcrumbs` | boolean | Show breadcrumb navigation |
196
+ | `showTableOfContents` | boolean | Show table of contents |
197
+ | `tocPosition` | `"left" \| "right"` | TOC position |
198
+ | `tocMaxDepth` | number | Maximum heading depth for TOC (1-6) |
199
+
200
+ ## Search Configuration
201
+
202
+ Configure the search functionality.
203
+
204
+ ```json
205
+ {
206
+ "search": {
207
+ "enabled": true,
208
+ "placeholder": "Search documentation...",
209
+ "provider": "meilisearch",
210
+ "meilisearch": {
211
+ "host": "http://localhost:7700",
212
+ "apiKey": "your-api-key",
213
+ "indexName": "docs"
214
+ }
215
+ }
216
+ }
217
+ ```
218
+
219
+ <Callout type="info">
220
+ Press **⌘K** (Mac) or **Ctrl+K** (Windows/Linux) to open the search modal.
221
+ </Callout>
222
+
223
+ ## Social Links
224
+
225
+ Add links to your social profiles and repositories.
226
+
227
+ ```json
228
+ {
229
+ "social": {
230
+ "github": "https://github.com/your-org/your-repo",
231
+ "twitter": "https://twitter.com/yourhandle",
232
+ "discord": "https://discord.gg/yourserver"
233
+ }
234
+ }
235
+ ```
236
+
237
+ ## Features Configuration
238
+
239
+ Toggle documentation features.
240
+
241
+ ```json
242
+ {
243
+ "features": {
244
+ "editUrl": "https://github.com/your-org/repo/edit/main/docs",
245
+ "showLastUpdated": true,
246
+ "showReadingTime": true,
247
+ "showAuthors": false,
248
+ "showTags": true,
249
+ "versioning": true
250
+ }
251
+ }
252
+ ```
253
+
254
+ | Option | Type | Description |
255
+ |--------|------|-------------|
256
+ | `editUrl` | string | Base URL for "Edit this page" links |
257
+ | `showLastUpdated` | boolean | Show last updated date |
258
+ | `showReadingTime` | boolean | Show estimated reading time |
259
+ | `showAuthors` | boolean | Show author information |
260
+ | `showTags` | boolean | Show document tags |
261
+ | `versioning` | boolean | Enable version switcher |
262
+
263
+ ## Environment Variables
264
+
265
+ Define custom environment variables that can be used in your MDX content:
266
+
267
+ ```json
268
+ {
269
+ "env": {
270
+ "API_BASE_URL": "https://api.example.com",
271
+ "API_VERSION": "v1"
272
+ }
273
+ }
274
+ ```
275
+
276
+ Use them in MDX with `${VARIABLE_NAME}` or `{{VARIABLE_NAME}}` syntax:
277
+
278
+ ```mdx
279
+ The API is available at ${API_BASE_URL}/users
280
+ ```
281
+
282
+ ## Banner Configuration
283
+
284
+ Show a site-wide banner for announcements.
285
+
286
+ ```json
287
+ {
288
+ "banner": {
289
+ "enabled": true,
290
+ "message": "🎉 Version 2.0 is now available!",
291
+ "type": "info",
292
+ "dismissible": true
293
+ }
294
+ }
295
+ ```
296
+
297
+ | Option | Type | Description |
298
+ |--------|------|-------------|
299
+ | `enabled` | boolean | Show/hide the banner |
300
+ | `message` | string | Banner message text |
301
+ | `type` | `"info" \| "warning" \| "error"` | Banner style |
302
+ | `dismissible` | boolean | Allow users to dismiss |
303
+
304
+ ## Footer Configuration
305
+
306
+ Customize the footer links.
307
+
308
+ ```json
309
+ {
310
+ "footer": {
311
+ "copyright": "© 2024 Your Organization",
312
+ "links": [
313
+ {
314
+ "title": "Documentation",
315
+ "items": [
316
+ { "label": "Getting Started", "href": "/docs/v1.0.0/getting-started" }
317
+ ]
318
+ }
319
+ ]
320
+ }
321
+ }
322
+ ```