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,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Introduction
|
|
3
|
+
description: Welcome to the documentation
|
|
4
|
+
sidebar_position: 1
|
|
5
|
+
icon: book
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Welcome to the documentation. This knowledge base covers everything you need to get started, create content, and customize your site.
|
|
9
|
+
|
|
10
|
+
## Quick Links
|
|
11
|
+
|
|
12
|
+
<CardGrid cols={2}>
|
|
13
|
+
<Card icon="zap" title="Quick Start" description="Get up and running in under 5 minutes" href="/docs/v1.0.0/quickstart" />
|
|
14
|
+
<Card icon="book-open" title="Core Concepts" description="Understand the key ideas behind the platform" href="/docs/v1.0.0/concepts" />
|
|
15
|
+
<Card icon="file-text" title="Content Guide" description="Learn how to write and organize content" href="/docs/v1.0.0/content/formatting" />
|
|
16
|
+
<Card icon="palette" title="Customization" description="Themes, branding, and design options" href="/docs/v1.0.0/customization/themes" />
|
|
17
|
+
</CardGrid>
|
|
18
|
+
|
|
19
|
+
## Overview
|
|
20
|
+
|
|
21
|
+
This documentation platform gives you a modern, fast, and beautiful docs experience out of the box. It supports:
|
|
22
|
+
|
|
23
|
+
- **Versioned documentation** — maintain docs for multiple releases
|
|
24
|
+
- **Dark and light themes** — automatic or manual switching
|
|
25
|
+
- **Rich components** — callouts, tabs, code blocks, cards, and more
|
|
26
|
+
- **Sidebar navigation** — auto-generated from your file structure
|
|
27
|
+
- **Full-text search** — find anything instantly
|
|
28
|
+
|
|
29
|
+
<Callout type="tip">
|
|
30
|
+
Use the sidebar to navigate between sections, or use the search bar to find specific topics.
|
|
31
|
+
</Callout>
|
|
32
|
+
|
|
33
|
+
## What's New
|
|
34
|
+
|
|
35
|
+
| Version | Highlights |
|
|
36
|
+
|---------|------------|
|
|
37
|
+
| **v2.0.0** | New customization options, improved performance |
|
|
38
|
+
| **v1.0.0** | Initial release with core features |
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Quick Start
|
|
3
|
+
description: Get up and running in under 5 minutes
|
|
4
|
+
sidebar_position: 2
|
|
5
|
+
icon: zap
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Follow these steps to set up your documentation site and start writing content.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
Before you begin, make sure you have:
|
|
13
|
+
|
|
14
|
+
- **Node.js 18+** installed
|
|
15
|
+
- A package manager (**npm**, **yarn**, or **pnpm**)
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
<Steps>
|
|
20
|
+
<Step title="Create a New Project">
|
|
21
|
+
Run the CLI to scaffold a new documentation site:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx create-specra my-docs
|
|
25
|
+
```
|
|
26
|
+
</Step>
|
|
27
|
+
|
|
28
|
+
<Step title="Install Dependencies">
|
|
29
|
+
<Tabs defaultValue="npm">
|
|
30
|
+
<Tab label="npm">
|
|
31
|
+
```bash
|
|
32
|
+
cd my-docs && npm install
|
|
33
|
+
```
|
|
34
|
+
</Tab>
|
|
35
|
+
<Tab label="yarn">
|
|
36
|
+
```bash
|
|
37
|
+
cd my-docs && yarn install
|
|
38
|
+
```
|
|
39
|
+
</Tab>
|
|
40
|
+
<Tab label="pnpm">
|
|
41
|
+
```bash
|
|
42
|
+
cd my-docs && pnpm install
|
|
43
|
+
```
|
|
44
|
+
</Tab>
|
|
45
|
+
</Tabs>
|
|
46
|
+
</Step>
|
|
47
|
+
|
|
48
|
+
<Step title="Start the Dev Server">
|
|
49
|
+
<Tabs defaultValue="npm">
|
|
50
|
+
<Tab label="npm">
|
|
51
|
+
```bash
|
|
52
|
+
npm run dev
|
|
53
|
+
```
|
|
54
|
+
</Tab>
|
|
55
|
+
<Tab label="yarn">
|
|
56
|
+
```bash
|
|
57
|
+
yarn dev
|
|
58
|
+
```
|
|
59
|
+
</Tab>
|
|
60
|
+
<Tab label="pnpm">
|
|
61
|
+
```bash
|
|
62
|
+
pnpm dev
|
|
63
|
+
```
|
|
64
|
+
</Tab>
|
|
65
|
+
</Tabs>
|
|
66
|
+
|
|
67
|
+
Your docs site is now running at `http://localhost:5173`.
|
|
68
|
+
</Step>
|
|
69
|
+
</Steps>
|
|
70
|
+
|
|
71
|
+
## Project Structure
|
|
72
|
+
|
|
73
|
+
After scaffolding, your project looks like this:
|
|
74
|
+
|
|
75
|
+
```txt
|
|
76
|
+
my-docs/
|
|
77
|
+
├── docs/
|
|
78
|
+
│ ├── v1.0.0/ # Your documentation files
|
|
79
|
+
│ └── v2.0.0/ # Another version
|
|
80
|
+
├── src/ # SvelteKit application
|
|
81
|
+
├── specra.config.json # Site configuration
|
|
82
|
+
└── package.json
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
<Callout type="info">
|
|
86
|
+
All documentation lives in the `docs/` directory as `.mdx` files. The sidebar is automatically generated from the folder structure.
|
|
87
|
+
</Callout>
|
|
88
|
+
|
|
89
|
+
## Creating Your First Page
|
|
90
|
+
|
|
91
|
+
Create a new file at `docs/v1.0.0/my-page.mdx`:
|
|
92
|
+
|
|
93
|
+
```mdx
|
|
94
|
+
---
|
|
95
|
+
title: My First Page
|
|
96
|
+
description: A page I just created
|
|
97
|
+
sidebar_position: 10
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
# Hello World
|
|
101
|
+
|
|
102
|
+
This is my first documentation page.
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Save the file and it will appear in the sidebar automatically.
|
|
106
|
+
|
|
107
|
+
## Next Steps
|
|
108
|
+
|
|
109
|
+
<CardGrid cols={2}>
|
|
110
|
+
<Card icon="lightbulb" title="Core Concepts" description="Learn the key ideas" href="/docs/v1.0.0/concepts" />
|
|
111
|
+
<Card icon="file-text" title="Formatting" description="Style your content" href="/docs/v1.0.0/content/formatting" />
|
|
112
|
+
</CardGrid>
|
|
@@ -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/ # Previous release
|
|
56
|
+
├── v2.0.0/ # Current 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,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/v2.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,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/v2.0.0/quickstart" },
|
|
65
|
+
{ "label": "Concepts", "href": "/docs/v2.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>
|