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.
- package/LICENSE.MD +33 -0
- package/README.md +246 -0
- package/dist/api-client-VHQARPDT.js +15 -0
- package/dist/api-client-VHQARPDT.js.map +1 -0
- package/dist/chunk-5765WX4D.js +192 -0
- package/dist/chunk-5765WX4D.js.map +1 -0
- package/dist/chunk-72RDEJR2.js +94 -0
- package/dist/chunk-72RDEJR2.js.map +1 -0
- package/dist/chunk-SQ2MMFUZ.js +102 -0
- package/dist/chunk-SQ2MMFUZ.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +242 -0
- package/dist/cli.js.map +1 -0
- package/dist/deploy-V4JO2D6B.js +179 -0
- package/dist/deploy-V4JO2D6B.js.map +1 -0
- package/dist/doctor-ICALAJ4N.js +309 -0
- package/dist/doctor-ICALAJ4N.js.map +1 -0
- package/dist/login-UG3WU7DY.js +92 -0
- package/dist/login-UG3WU7DY.js.map +1 -0
- package/dist/logout-WJKHJZT6.js +24 -0
- package/dist/logout-WJKHJZT6.js.map +1 -0
- package/dist/logs-BLUJPWNO.js +77 -0
- package/dist/logs-BLUJPWNO.js.map +1 -0
- package/dist/projects-LJ57GK3D.js +49 -0
- package/dist/projects-LJ57GK3D.js.map +1 -0
- package/package.json +50 -0
- package/templates/book-docs/.env.sample +1 -0
- package/templates/book-docs/docs/v1.0.0/concepts.mdx +89 -0
- package/templates/book-docs/docs/v1.0.0/content/_category_.json +7 -0
- package/templates/book-docs/docs/v1.0.0/content/formatting.mdx +128 -0
- package/templates/book-docs/docs/v1.0.0/content/reusable-content.mdx +116 -0
- package/templates/book-docs/docs/v1.0.0/content/structure.mdx +92 -0
- package/templates/book-docs/docs/v1.0.0/customization/_category_.json +7 -0
- package/templates/book-docs/docs/v1.0.0/customization/branding.mdx +115 -0
- package/templates/book-docs/docs/v1.0.0/customization/themes.mdx +81 -0
- package/templates/book-docs/docs/v1.0.0/introduction.mdx +38 -0
- package/templates/book-docs/docs/v1.0.0/quickstart.mdx +112 -0
- package/templates/book-docs/docs/v2.0.0/concepts.mdx +89 -0
- package/templates/book-docs/docs/v2.0.0/content/_category_.json +7 -0
- package/templates/book-docs/docs/v2.0.0/content/formatting.mdx +128 -0
- package/templates/book-docs/docs/v2.0.0/content/reusable-content.mdx +116 -0
- package/templates/book-docs/docs/v2.0.0/content/structure.mdx +92 -0
- package/templates/book-docs/docs/v2.0.0/customization/_category_.json +7 -0
- package/templates/book-docs/docs/v2.0.0/customization/branding.mdx +115 -0
- package/templates/book-docs/docs/v2.0.0/customization/themes.mdx +81 -0
- package/templates/book-docs/docs/v2.0.0/introduction.mdx +39 -0
- package/templates/book-docs/docs/v2.0.0/quickstart.mdx +112 -0
- package/templates/book-docs/gitignore +7 -0
- package/templates/book-docs/package.json +28 -0
- package/templates/book-docs/postcss.config.mjs +8 -0
- package/templates/book-docs/public/api-specs/openapi-example.json +259 -0
- package/templates/book-docs/public/api-specs/postman-example.json +205 -0
- package/templates/book-docs/public/api-specs/test-api.json +256 -0
- package/templates/book-docs/public/api-specs/users-api.json +264 -0
- package/templates/book-docs/specra.config.json +77 -0
- package/templates/book-docs/src/app.css +86 -0
- package/templates/book-docs/src/app.html +17 -0
- package/templates/book-docs/src/params/product.ts +7 -0
- package/templates/book-docs/src/routes/+layout.server.ts +14 -0
- package/templates/book-docs/src/routes/+layout.svelte +21 -0
- package/templates/book-docs/src/routes/+page.server.ts +9 -0
- package/templates/book-docs/src/routes/docs/[product=product]/[version]/+layout.server.ts +40 -0
- package/templates/book-docs/src/routes/docs/[product=product]/[version]/+page.server.ts +24 -0
- package/templates/book-docs/src/routes/docs/[product=product]/[version]/[...slug]/+page.server.ts +131 -0
- package/templates/book-docs/src/routes/docs/[product=product]/[version]/[...slug]/+page.svelte +180 -0
- package/templates/book-docs/src/routes/docs/[version]/+layout.server.ts +42 -0
- package/templates/book-docs/src/routes/docs/[version]/+page.server.ts +27 -0
- package/templates/book-docs/src/routes/docs/[version]/[...slug]/+page.server.ts +106 -0
- package/templates/book-docs/src/routes/docs/[version]/[...slug]/+page.svelte +172 -0
- package/templates/book-docs/static/favicon.svg +4 -0
- package/templates/book-docs/svelte.config.js +13 -0
- package/templates/book-docs/tsconfig.json +12 -0
- package/templates/book-docs/vite.config.ts +6 -0
- package/templates/jbrains-docs/.env.sample +1 -0
- package/templates/jbrains-docs/docs/v1.0.0/advanced/_category_.json +8 -0
- package/templates/jbrains-docs/docs/v1.0.0/advanced/async.mdx +95 -0
- package/templates/jbrains-docs/docs/v1.0.0/advanced/generics.mdx +126 -0
- package/templates/jbrains-docs/docs/v1.0.0/basics/_category_.json +8 -0
- package/templates/jbrains-docs/docs/v1.0.0/basics/control-flow.mdx +106 -0
- package/templates/jbrains-docs/docs/v1.0.0/basics/syntax.mdx +129 -0
- package/templates/jbrains-docs/docs/v1.0.0/basics/types.mdx +135 -0
- package/templates/jbrains-docs/docs/v1.0.0/getting-started.mdx +111 -0
- package/templates/jbrains-docs/docs/v1.0.0/home.mdx +37 -0
- package/templates/jbrains-docs/docs/v1.0.0/tools/_category_.json +8 -0
- package/templates/jbrains-docs/docs/v1.0.0/tools/build-tools.mdx +165 -0
- package/templates/jbrains-docs/docs/v1.0.0/tools/testing.mdx +112 -0
- package/templates/jbrains-docs/docs/v2.0.0/advanced/_category_.json +8 -0
- package/templates/jbrains-docs/docs/v2.0.0/advanced/async.mdx +95 -0
- package/templates/jbrains-docs/docs/v2.0.0/advanced/generics.mdx +126 -0
- package/templates/jbrains-docs/docs/v2.0.0/basics/_category_.json +8 -0
- package/templates/jbrains-docs/docs/v2.0.0/basics/control-flow.mdx +106 -0
- package/templates/jbrains-docs/docs/v2.0.0/basics/syntax.mdx +129 -0
- package/templates/jbrains-docs/docs/v2.0.0/basics/types.mdx +135 -0
- package/templates/jbrains-docs/docs/v2.0.0/getting-started.mdx +111 -0
- package/templates/jbrains-docs/docs/v2.0.0/home.mdx +37 -0
- package/templates/jbrains-docs/docs/v2.0.0/tools/_category_.json +8 -0
- package/templates/jbrains-docs/docs/v2.0.0/tools/build-tools.mdx +165 -0
- package/templates/jbrains-docs/docs/v2.0.0/tools/testing.mdx +112 -0
- package/templates/jbrains-docs/gitignore +7 -0
- package/templates/jbrains-docs/package.json +28 -0
- package/templates/jbrains-docs/postcss.config.mjs +8 -0
- package/templates/jbrains-docs/public/api-specs/openapi-example.json +259 -0
- package/templates/jbrains-docs/public/api-specs/postman-example.json +205 -0
- package/templates/jbrains-docs/public/api-specs/test-api.json +256 -0
- package/templates/jbrains-docs/public/api-specs/users-api.json +264 -0
- package/templates/jbrains-docs/specra.config.json +80 -0
- package/templates/jbrains-docs/src/app.css +86 -0
- package/templates/jbrains-docs/src/app.html +17 -0
- package/templates/jbrains-docs/src/params/product.ts +7 -0
- package/templates/jbrains-docs/src/routes/+layout.server.ts +14 -0
- package/templates/jbrains-docs/src/routes/+layout.svelte +21 -0
- package/templates/jbrains-docs/src/routes/+page.server.ts +9 -0
- package/templates/jbrains-docs/src/routes/docs/[product=product]/[version]/+layout.server.ts +40 -0
- package/templates/jbrains-docs/src/routes/docs/[product=product]/[version]/+page.server.ts +24 -0
- package/templates/jbrains-docs/src/routes/docs/[product=product]/[version]/[...slug]/+page.server.ts +131 -0
- package/templates/jbrains-docs/src/routes/docs/[product=product]/[version]/[...slug]/+page.svelte +180 -0
- package/templates/jbrains-docs/src/routes/docs/[version]/+layout.server.ts +42 -0
- package/templates/jbrains-docs/src/routes/docs/[version]/+page.server.ts +27 -0
- package/templates/jbrains-docs/src/routes/docs/[version]/[...slug]/+page.server.ts +106 -0
- package/templates/jbrains-docs/src/routes/docs/[version]/[...slug]/+page.svelte +172 -0
- package/templates/jbrains-docs/static/favicon.svg +4 -0
- package/templates/jbrains-docs/svelte.config.js +13 -0
- package/templates/jbrains-docs/tsconfig.json +12 -0
- package/templates/jbrains-docs/vite.config.ts +6 -0
- package/templates/minimal/.env.sample +1 -0
- package/templates/minimal/docs/v1.0.0/about.mdx +57 -0
- package/templates/minimal/docs/v1.0.0/components/_category_.json +8 -0
- package/templates/minimal/docs/v1.0.0/components/callout.mdx +83 -0
- package/templates/minimal/docs/v1.0.0/components/code-block.mdx +103 -0
- package/templates/minimal/docs/v1.0.0/components/index.mdx +8 -0
- package/templates/minimal/docs/v1.0.0/components/tabs.mdx +92 -0
- package/templates/minimal/docs/v1.0.0/configuration.mdx +322 -0
- package/templates/minimal/docs/v1.0.0/features.mdx +197 -0
- package/templates/minimal/docs/v1.0.0/getting-started.mdx +183 -0
- package/templates/minimal/docs/v2.0.0/about.mdx +57 -0
- package/templates/minimal/docs/v2.0.0/components/_category_.json +8 -0
- package/templates/minimal/docs/v2.0.0/components/callout.mdx +83 -0
- package/templates/minimal/docs/v2.0.0/components/code-block.mdx +103 -0
- package/templates/minimal/docs/v2.0.0/components/index.mdx +8 -0
- package/templates/minimal/docs/v2.0.0/components/tabs.mdx +92 -0
- package/templates/minimal/docs/v2.0.0/configuration.mdx +322 -0
- package/templates/minimal/docs/v2.0.0/features.mdx +197 -0
- package/templates/minimal/docs/v2.0.0/getting-started.mdx +183 -0
- package/templates/minimal/gitignore +7 -0
- package/templates/minimal/package.json +29 -0
- package/templates/minimal/postcss.config.mjs +8 -0
- package/templates/minimal/specra.config.json +91 -0
- package/templates/minimal/src/app.css +86 -0
- package/templates/minimal/src/app.html +17 -0
- package/templates/minimal/src/hooks.server.ts +8 -0
- package/templates/minimal/src/params/product.ts +7 -0
- package/templates/minimal/src/routes/+error.svelte +10 -0
- package/templates/minimal/src/routes/+layout.server.ts +14 -0
- package/templates/minimal/src/routes/+layout.svelte +21 -0
- package/templates/minimal/src/routes/+page.server.ts +9 -0
- package/templates/minimal/src/routes/+page.svelte +149 -0
- package/templates/minimal/src/routes/docs/[product=product]/[version]/+layout.server.ts +40 -0
- package/templates/minimal/src/routes/docs/[product=product]/[version]/+page.server.ts +24 -0
- package/templates/minimal/src/routes/docs/[product=product]/[version]/[...slug]/+page.server.ts +131 -0
- package/templates/minimal/src/routes/docs/[product=product]/[version]/[...slug]/+page.svelte +180 -0
- package/templates/minimal/src/routes/docs/[version]/+layout.server.ts +42 -0
- package/templates/minimal/src/routes/docs/[version]/+page.server.ts +27 -0
- package/templates/minimal/src/routes/docs/[version]/[...slug]/+page.server.ts +106 -0
- package/templates/minimal/src/routes/docs/[version]/[...slug]/+page.svelte +172 -0
- package/templates/minimal/static/api-specs/openapi-example.json +259 -0
- package/templates/minimal/static/api-specs/postman-example.json +205 -0
- package/templates/minimal/static/api-specs/test-api.json +256 -0
- package/templates/minimal/static/api-specs/users-api.json +264 -0
- package/templates/minimal/static/favicon.svg +4 -0
- package/templates/minimal/svelte.config.js +13 -0
- package/templates/minimal/tsconfig.json +12 -0
- package/templates/minimal/vite.config.ts +6 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Features
|
|
3
|
+
description: Explore all the features of the Specra documentation platform
|
|
4
|
+
sidebar_position: 4
|
|
5
|
+
icon: scroll-text
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Content Features
|
|
9
|
+
|
|
10
|
+
### MDX Support
|
|
11
|
+
|
|
12
|
+
Write documentation in MDX—Markdown with React components built in.
|
|
13
|
+
|
|
14
|
+
```mdx
|
|
15
|
+
# Hello World
|
|
16
|
+
|
|
17
|
+
This is **Markdown** with a <Badge variant="success">React component</Badge>!
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
<Callout type="tip">
|
|
21
|
+
MDX lets you create interactive, dynamic documentation that goes beyond static text.
|
|
22
|
+
</Callout>
|
|
23
|
+
|
|
24
|
+
### Syntax Highlighting
|
|
25
|
+
|
|
26
|
+
Code blocks automatically get syntax highlighting with line numbers:
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
interface User {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
email: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function greetUser(user: User): string {
|
|
36
|
+
return `Hello, ${user.name}!`;
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Supported languages include JavaScript, TypeScript, Python, Bash, JSON, CSS, and many more.
|
|
41
|
+
|
|
42
|
+
### Math Equations
|
|
43
|
+
|
|
44
|
+
Render mathematical equations using KaTeX:
|
|
45
|
+
|
|
46
|
+
Inline: <Math>{"E = mc^2"}</Math>
|
|
47
|
+
|
|
48
|
+
Block:
|
|
49
|
+
<Math block>
|
|
50
|
+
{"\\int_{-\\infty}^{\\infty} e^{-x^2} dx = \\sqrt{\\pi}"}
|
|
51
|
+
</Math>
|
|
52
|
+
|
|
53
|
+
### Mermaid Diagrams
|
|
54
|
+
|
|
55
|
+
Create diagrams from text using Mermaid:
|
|
56
|
+
|
|
57
|
+
<Mermaid
|
|
58
|
+
chart={`
|
|
59
|
+
graph LR
|
|
60
|
+
A[Write MDX] --> B[Build]
|
|
61
|
+
B --> C[Deploy]
|
|
62
|
+
C --> D[Users Read Docs]
|
|
63
|
+
`}
|
|
64
|
+
caption="Documentation workflow"
|
|
65
|
+
/>
|
|
66
|
+
|
|
67
|
+
## Navigation Features
|
|
68
|
+
|
|
69
|
+
### Automatic Sidebar
|
|
70
|
+
|
|
71
|
+
The sidebar is automatically generated from your folder structure. Use `_category_.json` to customize:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"label": "Guides",
|
|
76
|
+
"position": 2,
|
|
77
|
+
"collapsible": true,
|
|
78
|
+
"collapsed": false
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Table of Contents
|
|
83
|
+
|
|
84
|
+
A floating table of contents is automatically generated from your headings. It highlights the current section as you scroll.
|
|
85
|
+
|
|
86
|
+
### Breadcrumbs
|
|
87
|
+
|
|
88
|
+
Breadcrumb navigation helps users understand their location in the documentation hierarchy.
|
|
89
|
+
|
|
90
|
+
### Version Switcher
|
|
91
|
+
|
|
92
|
+
Support multiple documentation versions with easy switching:
|
|
93
|
+
|
|
94
|
+
- `/docs/v1.0.0/getting-started`
|
|
95
|
+
- `/docs/v2.0.0/getting-started`
|
|
96
|
+
- `/docs/next/getting-started` (unreleased)
|
|
97
|
+
|
|
98
|
+
## Search
|
|
99
|
+
|
|
100
|
+
### Full-Text Search
|
|
101
|
+
|
|
102
|
+
Powered by Meilisearch for instant, typo-tolerant search results.
|
|
103
|
+
|
|
104
|
+
- **Keyboard shortcut**: Press `⌘K` or `Ctrl+K` to open search
|
|
105
|
+
- **Typo tolerance**: Finds results even with spelling mistakes
|
|
106
|
+
- **Highlighted results**: See where your query matches
|
|
107
|
+
|
|
108
|
+
### Search Indexing
|
|
109
|
+
|
|
110
|
+
Documentation is automatically indexed at build time for fast search.
|
|
111
|
+
|
|
112
|
+
## Theme & Styling
|
|
113
|
+
|
|
114
|
+
### Dark Mode
|
|
115
|
+
|
|
116
|
+
Automatic dark mode that respects system preferences:
|
|
117
|
+
|
|
118
|
+
- Light mode
|
|
119
|
+
- Dark mode
|
|
120
|
+
- System preference (auto)
|
|
121
|
+
|
|
122
|
+
Toggle with the button in the header.
|
|
123
|
+
|
|
124
|
+
### Customizable Design
|
|
125
|
+
|
|
126
|
+
All styling is based on CSS variables and Tailwind, making customization easy:
|
|
127
|
+
|
|
128
|
+
```css
|
|
129
|
+
:root {
|
|
130
|
+
--primary: oklch(0.55 0.22 264.376);
|
|
131
|
+
--background: oklch(1 0 0);
|
|
132
|
+
--foreground: oklch(0.145 0 0);
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Components
|
|
137
|
+
|
|
138
|
+
### Rich Component Library
|
|
139
|
+
|
|
140
|
+
Built-in components for common documentation patterns:
|
|
141
|
+
|
|
142
|
+
<CardGrid cols={3}>
|
|
143
|
+
<Card icon="message-square" title="Callouts" description="Info, warning, tip, error alerts" />
|
|
144
|
+
<Card icon="layers" title="Tabs" description="Tabbed content sections" />
|
|
145
|
+
<Card icon="list" title="Steps" description="Step-by-step guides" />
|
|
146
|
+
<Card icon="chevrons-up-down" title="Accordion" description="Collapsible content" />
|
|
147
|
+
<Card icon="grid" title="Cards" description="Feature cards with icons" />
|
|
148
|
+
<Card icon="code" title="Code Blocks" description="Syntax highlighted code" />
|
|
149
|
+
</CardGrid>
|
|
150
|
+
|
|
151
|
+
See the [Components](/docs/v1.0.0/components) section for documentation on each component.
|
|
152
|
+
|
|
153
|
+
## Developer Experience
|
|
154
|
+
|
|
155
|
+
### Hot Reload
|
|
156
|
+
|
|
157
|
+
Changes to MDX files are instantly reflected without a full page refresh.
|
|
158
|
+
|
|
159
|
+
### Frontmatter Validation
|
|
160
|
+
|
|
161
|
+
Frontmatter fields are validated at build time to catch errors early.
|
|
162
|
+
|
|
163
|
+
### SEO Optimization
|
|
164
|
+
|
|
165
|
+
Automatic meta tags, OpenGraph images, and structured data from frontmatter:
|
|
166
|
+
|
|
167
|
+
- Title and description tags
|
|
168
|
+
- OpenGraph and Twitter cards
|
|
169
|
+
- Canonical URLs
|
|
170
|
+
- Sitemap generation
|
|
171
|
+
|
|
172
|
+
### Reading Time
|
|
173
|
+
|
|
174
|
+
Automatic calculation and display of estimated reading time for each page.
|
|
175
|
+
|
|
176
|
+
## Production Features
|
|
177
|
+
|
|
178
|
+
### Static Generation
|
|
179
|
+
|
|
180
|
+
All pages are pre-rendered at build time for maximum performance:
|
|
181
|
+
|
|
182
|
+
- Zero JavaScript required for content
|
|
183
|
+
- Edge caching friendly
|
|
184
|
+
- Fast Time to First Byte (TTFB)
|
|
185
|
+
|
|
186
|
+
### Performance
|
|
187
|
+
|
|
188
|
+
- Lighthouse score: 90+ (desktop)
|
|
189
|
+
- Lazy-loaded images with Next.js Image
|
|
190
|
+
- Code splitting for components
|
|
191
|
+
|
|
192
|
+
### Accessibility
|
|
193
|
+
|
|
194
|
+
- Keyboard navigation
|
|
195
|
+
- Screen reader support
|
|
196
|
+
- High contrast support
|
|
197
|
+
- Focus management
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Getting Started
|
|
3
|
+
description: Set up and start writing documentation with Specra
|
|
4
|
+
sidebar_position: 2
|
|
5
|
+
icon: book
|
|
6
|
+
tab_group: guides
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
Before you begin, make sure you have:
|
|
12
|
+
- Node.js 18+ installed
|
|
13
|
+
- A package manager (npm, yarn, or pnpm)
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
<Steps>
|
|
18
|
+
<Step title="Clone the Repository">
|
|
19
|
+
```bash
|
|
20
|
+
git clone https://github.com/your-org/specra-docs.git
|
|
21
|
+
cd specra-docs
|
|
22
|
+
```
|
|
23
|
+
</Step>
|
|
24
|
+
|
|
25
|
+
<Step title="Install Dependencies">
|
|
26
|
+
<Tabs defaultValue="npm">
|
|
27
|
+
<Tab label="npm">
|
|
28
|
+
```bash
|
|
29
|
+
npm install
|
|
30
|
+
```
|
|
31
|
+
</Tab>
|
|
32
|
+
<Tab label="yarn">
|
|
33
|
+
```bash
|
|
34
|
+
yarn install
|
|
35
|
+
```
|
|
36
|
+
</Tab>
|
|
37
|
+
<Tab label="pnpm">
|
|
38
|
+
```bash
|
|
39
|
+
pnpm install
|
|
40
|
+
```
|
|
41
|
+
</Tab>
|
|
42
|
+
</Tabs>
|
|
43
|
+
</Step>
|
|
44
|
+
|
|
45
|
+
<Step title="Start Development Server">
|
|
46
|
+
<Tabs defaultValue="npm">
|
|
47
|
+
<Tab label="npm">
|
|
48
|
+
```bash
|
|
49
|
+
npm run dev
|
|
50
|
+
```
|
|
51
|
+
</Tab>
|
|
52
|
+
<Tab label="yarn">
|
|
53
|
+
```bash
|
|
54
|
+
yarn dev
|
|
55
|
+
```
|
|
56
|
+
</Tab>
|
|
57
|
+
<Tab label="pnpm">
|
|
58
|
+
```bash
|
|
59
|
+
pnpm dev
|
|
60
|
+
```
|
|
61
|
+
</Tab>
|
|
62
|
+
</Tabs>
|
|
63
|
+
|
|
64
|
+
Open [http://localhost:3000](http://localhost:3000) to view your docs.
|
|
65
|
+
</Step>
|
|
66
|
+
</Steps>
|
|
67
|
+
|
|
68
|
+
## Creating Documentation
|
|
69
|
+
|
|
70
|
+
<Callout type="warning">
|
|
71
|
+
All documentation files **must use the `.mdx` extension**, not `.md`. MDX enables React components inside your markdown.
|
|
72
|
+
</Callout>
|
|
73
|
+
|
|
74
|
+
### File Structure
|
|
75
|
+
|
|
76
|
+
Documentation lives in the `docs/` folder, organized by version:
|
|
77
|
+
|
|
78
|
+
```txt
|
|
79
|
+
docs/
|
|
80
|
+
├── v1.0.0/ # Version 1.0.0 docs
|
|
81
|
+
│ ├── about.mdx
|
|
82
|
+
│ ├── getting-started.mdx
|
|
83
|
+
│ └── guides/
|
|
84
|
+
│ ├── _category_.json
|
|
85
|
+
│ └── writing-content.mdx
|
|
86
|
+
├── v2.0.0/ # Version 2.0.0 docs
|
|
87
|
+
│ └── ...
|
|
88
|
+
└── next/ # Unreleased/development docs
|
|
89
|
+
└── ...
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Creating a New Page
|
|
93
|
+
|
|
94
|
+
1. Create a new `.mdx` file in the appropriate folder
|
|
95
|
+
2. Add frontmatter at the top of the file
|
|
96
|
+
3. Write your content using Markdown and components
|
|
97
|
+
|
|
98
|
+
**Example: `docs/v1.0.0/my-page.mdx`**
|
|
99
|
+
|
|
100
|
+
```mdx
|
|
101
|
+
---
|
|
102
|
+
title: My Page Title
|
|
103
|
+
description: A brief description for SEO
|
|
104
|
+
sidebar_position: 5
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
# My Page Title
|
|
108
|
+
|
|
109
|
+
Your content goes here. You can use **Markdown**
|
|
110
|
+
and <Badge>React components</Badge>.
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Frontmatter
|
|
114
|
+
|
|
115
|
+
Every MDX file should have frontmatter at the top. Here are the available fields:
|
|
116
|
+
|
|
117
|
+
| Field | Required | Description |
|
|
118
|
+
|-------|----------|-------------|
|
|
119
|
+
| `title` | ✅ | Page title (used in sidebar and browser tab) |
|
|
120
|
+
| `description` | Recommended | Short description for SEO meta tags |
|
|
121
|
+
| `sidebar_position` | No | Order in the sidebar (lower = higher) |
|
|
122
|
+
| `tab_group` | No | Tab group name |
|
|
123
|
+
| `tags` | No | Array of tags for categorization |
|
|
124
|
+
| `draft` | No | Set `true` to hide in production |
|
|
125
|
+
| `last_updated` | No | Date string for "last updated" display |
|
|
126
|
+
|
|
127
|
+
<Callout type="tip">
|
|
128
|
+
Use `sidebar_position` to control the order of pages in the sidebar. Pages are sorted by this number, then alphabetically.
|
|
129
|
+
</Callout>
|
|
130
|
+
|
|
131
|
+
## Organizing with Folders
|
|
132
|
+
|
|
133
|
+
Create folders to group related documentation:
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
docs/v1.0.0/
|
|
137
|
+
├── guides/
|
|
138
|
+
│ ├── _category_.json # Configure folder display
|
|
139
|
+
│ ├── index.mdx # Optional: custom folder landing page
|
|
140
|
+
│ ├── installation.mdx
|
|
141
|
+
│ └── configuration.mdx
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Category Configuration
|
|
145
|
+
|
|
146
|
+
Create `_category_.json` in a folder to customize its sidebar appearance:
|
|
147
|
+
|
|
148
|
+
```json
|
|
149
|
+
{
|
|
150
|
+
"label": "Guides",
|
|
151
|
+
"position": 2,
|
|
152
|
+
"collapsible": true,
|
|
153
|
+
"collapsed": false
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Using Components
|
|
158
|
+
|
|
159
|
+
Specra includes many built-in components. Import is automatic—just use them:
|
|
160
|
+
|
|
161
|
+
```mdx
|
|
162
|
+
<Callout type="info">
|
|
163
|
+
This is an info callout!
|
|
164
|
+
</Callout>
|
|
165
|
+
|
|
166
|
+
<Tabs defaultValue="JavaScript">
|
|
167
|
+
<Tab label="JavaScript">
|
|
168
|
+
JavaScript code here
|
|
169
|
+
</Tab>
|
|
170
|
+
<Tab label="Python">
|
|
171
|
+
Python code here
|
|
172
|
+
</Tab>
|
|
173
|
+
</Tabs>
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
See the [Components](/docs/v1.0.0/components) section for all available components.
|
|
177
|
+
|
|
178
|
+
## Next Steps
|
|
179
|
+
|
|
180
|
+
<CardGrid cols={2}>
|
|
181
|
+
<Card icon="settings" title="Configuration" description="Customize your docs site" href="/docs/v1.0.0/configuration" />
|
|
182
|
+
<Card icon="layers" title="Features" description="Explore all platform features" href="/docs/v1.0.0/features" />
|
|
183
|
+
</CardGrid>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "my-docs",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite dev",
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"preview": "vite preview",
|
|
10
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"lucide-svelte": "^0.454.0",
|
|
14
|
+
"specra": "^0.2.4"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@sveltejs/adapter-static": "^3.0.0",
|
|
18
|
+
"@sveltejs/kit": "^2.0.0",
|
|
19
|
+
"@sveltejs/vite-plugin-svelte": "^6.0.0",
|
|
20
|
+
"@tailwindcss/postcss": "^4.1.9",
|
|
21
|
+
"@tailwindcss/typography": "^0.5.19",
|
|
22
|
+
"postcss": "^8.5",
|
|
23
|
+
"svelte": "^5.0.0",
|
|
24
|
+
"svelte-check": "^4.0.0",
|
|
25
|
+
"tailwindcss": "^4.1.9",
|
|
26
|
+
"typescript": "^5",
|
|
27
|
+
"vite": "^6.3.0"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/specra/config/specra.config.schema.json",
|
|
3
|
+
"site": {
|
|
4
|
+
"title": "My Docs",
|
|
5
|
+
"description": "Documentation for my project",
|
|
6
|
+
"url": "http://localhost:5173",
|
|
7
|
+
"baseUrl": "/",
|
|
8
|
+
"language": "en",
|
|
9
|
+
"organizationName": "my-org",
|
|
10
|
+
"projectName": "my-project",
|
|
11
|
+
"activeVersion": "v1.0.0"
|
|
12
|
+
},
|
|
13
|
+
"theme": {
|
|
14
|
+
"defaultMode": "system",
|
|
15
|
+
"respectPrefersColorScheme": true
|
|
16
|
+
},
|
|
17
|
+
"navigation": {
|
|
18
|
+
"showSidebar": true,
|
|
19
|
+
"collapsibleSidebar": true,
|
|
20
|
+
"showBreadcrumbs": true,
|
|
21
|
+
"showTableOfContents": true,
|
|
22
|
+
"tocPosition": "right",
|
|
23
|
+
"tocMaxDepth": 3,
|
|
24
|
+
"tabGroups": [
|
|
25
|
+
{
|
|
26
|
+
"id": "guides",
|
|
27
|
+
"label": "Guides",
|
|
28
|
+
"icon": "book-open"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "api",
|
|
32
|
+
"label": "API Reference",
|
|
33
|
+
"icon": "zap"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "components",
|
|
37
|
+
"label": "Components",
|
|
38
|
+
"icon": "layers"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"social": {
|
|
43
|
+
"github": "https://github.com/your-org/your-repo"
|
|
44
|
+
},
|
|
45
|
+
"search": {
|
|
46
|
+
"enabled": false
|
|
47
|
+
},
|
|
48
|
+
"footer": {
|
|
49
|
+
"copyright": "Copyright © 2025 My Project. All rights reserved.",
|
|
50
|
+
"links": [
|
|
51
|
+
{
|
|
52
|
+
"title": "Documentation",
|
|
53
|
+
"items": [
|
|
54
|
+
{
|
|
55
|
+
"label": "Getting Started",
|
|
56
|
+
"href": "/docs/v1.0.0/getting-started"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"title": "Community",
|
|
62
|
+
"items": [
|
|
63
|
+
{
|
|
64
|
+
"label": "GitHub",
|
|
65
|
+
"href": "https://github.com/your-org/your-repo"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"branding": {
|
|
71
|
+
"showBranding": true,
|
|
72
|
+
"logo": "https://specra-docs.com/favicon.svg",
|
|
73
|
+
"title": "Specra",
|
|
74
|
+
"url": "https://specra-docs.com"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"banner": {
|
|
78
|
+
"enabled": false,
|
|
79
|
+
"message": "🎉 This is a development version. Some features may not work as expected.",
|
|
80
|
+
"type": "error",
|
|
81
|
+
"dismissible": true
|
|
82
|
+
},
|
|
83
|
+
"features": {
|
|
84
|
+
"showLastUpdated": true,
|
|
85
|
+
"showReadingTime": true,
|
|
86
|
+
"showAuthors": false,
|
|
87
|
+
"showTags": true,
|
|
88
|
+
"versioning": true,
|
|
89
|
+
"i18n": false
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
@import "specra/styles";
|
|
2
|
+
@source "./**/*.{js,ts,svelte}";
|
|
3
|
+
|
|
4
|
+
@theme inline {
|
|
5
|
+
--font-sans: "Geist", "Geist Fallback", system-ui, sans-serif;
|
|
6
|
+
--font-mono: "Geist Mono", "Geist Mono Fallback", monospace;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* =============================================
|
|
10
|
+
THEME OVERRIDES
|
|
11
|
+
Uncomment a :root block for light theme and/or
|
|
12
|
+
a .dark block for dark theme. Mix and match!
|
|
13
|
+
============================================= */
|
|
14
|
+
|
|
15
|
+
/* ─── Mint Light ─── */
|
|
16
|
+
/* :root {
|
|
17
|
+
--primary: oklch(0.45 0.18 162);
|
|
18
|
+
--primary-foreground: oklch(0.98 0 0);
|
|
19
|
+
--ring: oklch(0.45 0.18 162);
|
|
20
|
+
} */
|
|
21
|
+
|
|
22
|
+
/* ─── Ocean Light ─── */
|
|
23
|
+
/* :root {
|
|
24
|
+
--primary: oklch(0.45 0.18 240);
|
|
25
|
+
--primary-foreground: oklch(0.98 0 0);
|
|
26
|
+
--ring: oklch(0.45 0.18 240);
|
|
27
|
+
} */
|
|
28
|
+
|
|
29
|
+
/* ─── Rose Light ─── */
|
|
30
|
+
/* :root {
|
|
31
|
+
--primary: oklch(0.50 0.20 350);
|
|
32
|
+
--primary-foreground: oklch(0.98 0 0);
|
|
33
|
+
--ring: oklch(0.50 0.20 350);
|
|
34
|
+
} */
|
|
35
|
+
|
|
36
|
+
/* ─── Amber Light ─── */
|
|
37
|
+
/* :root {
|
|
38
|
+
--primary: oklch(0.55 0.16 70);
|
|
39
|
+
--primary-foreground: oklch(0.98 0 0);
|
|
40
|
+
--ring: oklch(0.55 0.16 70);
|
|
41
|
+
} */
|
|
42
|
+
|
|
43
|
+
/* ─── Violet Light ─── */
|
|
44
|
+
/* :root {
|
|
45
|
+
--primary: oklch(0.48 0.22 290);
|
|
46
|
+
--primary-foreground: oklch(0.98 0 0);
|
|
47
|
+
--ring: oklch(0.48 0.22 290);
|
|
48
|
+
} */
|
|
49
|
+
|
|
50
|
+
/* ─── Mint Dark ─── */
|
|
51
|
+
/* .dark {
|
|
52
|
+
--primary: oklch(0.72 0.18 162);
|
|
53
|
+
--primary-foreground: oklch(0.10 0.03 160);
|
|
54
|
+
--ring: oklch(0.72 0.18 162);
|
|
55
|
+
} */
|
|
56
|
+
|
|
57
|
+
/* ─── Ocean Dark ─── */
|
|
58
|
+
/* .dark {
|
|
59
|
+
--primary: oklch(0.68 0.16 240);
|
|
60
|
+
--primary-foreground: oklch(0.98 0 0);
|
|
61
|
+
--ring: oklch(0.68 0.16 240);
|
|
62
|
+
} */
|
|
63
|
+
|
|
64
|
+
/* ─── Rose Dark ─── */
|
|
65
|
+
/* .dark {
|
|
66
|
+
--primary: oklch(0.70 0.18 350);
|
|
67
|
+
--primary-foreground: oklch(0.98 0 0);
|
|
68
|
+
--ring: oklch(0.70 0.18 350);
|
|
69
|
+
} */
|
|
70
|
+
|
|
71
|
+
/* ─── Amber Dark ─── */
|
|
72
|
+
/* .dark {
|
|
73
|
+
--primary: oklch(0.75 0.16 70);
|
|
74
|
+
--primary-foreground: oklch(0.10 0.03 70);
|
|
75
|
+
--ring: oklch(0.75 0.16 70);
|
|
76
|
+
} */
|
|
77
|
+
|
|
78
|
+
/* ─── Violet Dark ─── */
|
|
79
|
+
/* .dark {
|
|
80
|
+
--primary: oklch(0.70 0.20 290);
|
|
81
|
+
--primary-foreground: oklch(0.98 0 0);
|
|
82
|
+
--ring: oklch(0.70 0.20 290);
|
|
83
|
+
} */
|
|
84
|
+
|
|
85
|
+
/* For full theme customization (backgrounds, borders, sidebar, etc.)
|
|
86
|
+
see: https://specra-docs.com/docs/v1.0.0/configuration/theming */
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<link rel="icon" href="%sveltekit.assets%/favicon.svg" type="image/svg+xml" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
8
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
|
+
<link
|
|
10
|
+
href="https://fonts.googleapis.com/css2?family=Geist+Mono:wght@100..900&family=Geist:wght@100..900&display=swap"
|
|
11
|
+
rel="stylesheet">
|
|
12
|
+
%sveltekit.head%
|
|
13
|
+
</head>
|
|
14
|
+
<body data-sveltekit-preload-data="hover" class="font-sans antialiased">
|
|
15
|
+
<div style="display: contents">%sveltekit.body%</div>
|
|
16
|
+
</body>
|
|
17
|
+
</html>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getConfig, initConfig } from 'specra';
|
|
2
|
+
import specraConfig from '../../specra.config.json';
|
|
3
|
+
import type { LayoutServerLoad } from './$types';
|
|
4
|
+
import type { SpecraConfig } from 'specra';
|
|
5
|
+
|
|
6
|
+
initConfig(specraConfig as unknown as Partial<SpecraConfig>);
|
|
7
|
+
|
|
8
|
+
export const prerender = true;
|
|
9
|
+
export const trailingSlash = 'never';
|
|
10
|
+
|
|
11
|
+
export const load: LayoutServerLoad = async () => {
|
|
12
|
+
const config = getConfig();
|
|
13
|
+
return { config };
|
|
14
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import '../app.css';
|
|
3
|
+
import { LayoutProviders } from 'specra/components';
|
|
4
|
+
import type { Snippet } from 'svelte';
|
|
5
|
+
import type { LayoutData } from './$types';
|
|
6
|
+
|
|
7
|
+
let { data, children }: { data: LayoutData; children: Snippet } = $props();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<svelte:head>
|
|
11
|
+
<title>{data?.config?.site?.title || 'Documentation'}</title>
|
|
12
|
+
<meta name="description" content={data?.config?.site?.description || 'Modern documentation platform'} />
|
|
13
|
+
</svelte:head>
|
|
14
|
+
|
|
15
|
+
{#if data?.config}
|
|
16
|
+
<LayoutProviders config={data.config}>
|
|
17
|
+
{@render children?.()}
|
|
18
|
+
</LayoutProviders>
|
|
19
|
+
{:else}
|
|
20
|
+
{@render children?.()}
|
|
21
|
+
{/if}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { redirect } from '@sveltejs/kit';
|
|
2
|
+
import { getConfig } from 'specra';
|
|
3
|
+
import type { PageServerLoad } from './$types';
|
|
4
|
+
|
|
5
|
+
export const load: PageServerLoad = async () => {
|
|
6
|
+
const config = getConfig();
|
|
7
|
+
const activeVersion = config.site?.activeVersion || 'v1.0.0';
|
|
8
|
+
redirect(302, `/docs/${activeVersion}/about`);
|
|
9
|
+
};
|