@brainfish-ai/devdoc 0.1.25 → 0.1.26

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 (38) hide show
  1. package/README.md +2 -2
  2. package/dist/cli/commands/create.js +28 -9
  3. package/dist/cli/commands/dev.js +41 -77
  4. package/package.json +6 -6
  5. package/renderer/components/docs-viewer/index.tsx +41 -2
  6. package/renderer/components/docs-viewer/sidebar/collection-tree.tsx +20 -0
  7. package/templates/basic/README.md +0 -139
  8. package/templates/basic/assets/favicon.svg +0 -4
  9. package/templates/basic/assets/logo.svg +0 -9
  10. package/templates/basic/docs.json +0 -47
  11. package/templates/basic/guides/configuration.mdx +0 -149
  12. package/templates/basic/guides/overview.mdx +0 -96
  13. package/templates/basic/index.mdx +0 -39
  14. package/templates/basic/package.json +0 -14
  15. package/templates/basic/quickstart.mdx +0 -92
  16. package/templates/basic/vercel.json +0 -6
  17. package/templates/graphql/README.md +0 -139
  18. package/templates/graphql/api-reference/schema.graphql +0 -305
  19. package/templates/graphql/assets/favicon.svg +0 -4
  20. package/templates/graphql/assets/logo.svg +0 -9
  21. package/templates/graphql/docs.json +0 -54
  22. package/templates/graphql/guides/configuration.mdx +0 -149
  23. package/templates/graphql/guides/overview.mdx +0 -96
  24. package/templates/graphql/index.mdx +0 -39
  25. package/templates/graphql/package.json +0 -14
  26. package/templates/graphql/quickstart.mdx +0 -92
  27. package/templates/graphql/vercel.json +0 -6
  28. package/templates/openapi/README.md +0 -139
  29. package/templates/openapi/api-reference/openapi.json +0 -419
  30. package/templates/openapi/assets/favicon.svg +0 -4
  31. package/templates/openapi/assets/logo.svg +0 -9
  32. package/templates/openapi/docs.json +0 -61
  33. package/templates/openapi/guides/configuration.mdx +0 -149
  34. package/templates/openapi/guides/overview.mdx +0 -96
  35. package/templates/openapi/index.mdx +0 -39
  36. package/templates/openapi/package.json +0 -14
  37. package/templates/openapi/quickstart.mdx +0 -92
  38. package/templates/openapi/vercel.json +0 -6
@@ -1,47 +0,0 @@
1
- {
2
- "$schema": "https://devdoc.sh/docs.json",
3
- "name": "My Documentation",
4
- "favicon": "/favicon.svg",
5
- "logo": {
6
- "light": "/logo.svg",
7
- "dark": "/logo.svg"
8
- },
9
- "colors": {
10
- "primary": "#10b981"
11
- },
12
- "navigation": {
13
- "tabs": [
14
- {
15
- "tab": "Documentation",
16
- "type": "docs",
17
- "groups": [
18
- {
19
- "group": "Getting Started",
20
- "icon": "rocket-launch",
21
- "pages": [
22
- "index",
23
- "quickstart"
24
- ]
25
- },
26
- {
27
- "group": "Guides",
28
- "icon": "book-open",
29
- "pages": [
30
- "guides/overview",
31
- "guides/configuration"
32
- ]
33
- }
34
- ]
35
- }
36
- ],
37
- "global": {
38
- "anchors": [
39
- {
40
- "anchor": "GitHub",
41
- "href": "https://github.com/your-org/your-repo",
42
- "icon": "github-logo"
43
- }
44
- ]
45
- }
46
- }
47
- }
@@ -1,149 +0,0 @@
1
- ---
2
- title: Configuration
3
- description: Learn how to configure your documentation site
4
- ---
5
-
6
- # Configuration
7
-
8
- Your documentation is configured through the `docs.json` file in the root of your project.
9
-
10
- ## Basic Configuration
11
-
12
- ```json title="docs.json"
13
- {
14
- "name": "My Documentation",
15
- "favicon": "/favicon.svg",
16
- "logo": {
17
- "light": "/logo.svg",
18
- "dark": "/logo-dark.svg"
19
- },
20
- "colors": {
21
- "primary": "#10b981"
22
- }
23
- }
24
- ```
25
-
26
- ### Properties
27
-
28
- | Property | Type | Description |
29
- |----------|------|-------------|
30
- | `name` | string | The name of your documentation site |
31
- | `favicon` | string | Path to favicon file |
32
- | `logo` | object/string | Logo configuration |
33
- | `colors` | object | Color customization |
34
-
35
- ## Navigation
36
-
37
- Configure your sidebar navigation with tabs and groups:
38
-
39
- ```json title="docs.json"
40
- {
41
- "navigation": {
42
- "tabs": [
43
- {
44
- "tab": "Documentation",
45
- "type": "docs",
46
- "groups": [
47
- {
48
- "group": "Getting Started",
49
- "icon": "rocket-launch",
50
- "pages": ["index", "quickstart"]
51
- },
52
- {
53
- "group": "Guides",
54
- "pages": ["guides/overview", "guides/configuration"]
55
- }
56
- ]
57
- }
58
- ]
59
- }
60
- }
61
- ```
62
-
63
- ### Tab Types
64
-
65
- | Type | Description |
66
- |------|-------------|
67
- | `docs` | Standard documentation pages |
68
- | `openapi` | API reference from OpenAPI spec |
69
- | `changelog` | Changelog/release notes |
70
-
71
- ## Nested Navigation
72
-
73
- You can create nested groups for complex documentation:
74
-
75
- ```json
76
- {
77
- "group": "Advanced",
78
- "pages": [
79
- "advanced/intro",
80
- {
81
- "group": "Subgroup",
82
- "pages": ["advanced/sub/page1", "advanced/sub/page2"]
83
- }
84
- ]
85
- }
86
- ```
87
-
88
- ## Global Anchors
89
-
90
- Add external links to your navigation:
91
-
92
- ```json
93
- {
94
- "navigation": {
95
- "global": {
96
- "anchors": [
97
- {
98
- "anchor": "GitHub",
99
- "href": "https://github.com/your-org/your-repo",
100
- "icon": "github-logo"
101
- },
102
- {
103
- "anchor": "Discord",
104
- "href": "https://discord.gg/your-server",
105
- "icon": "discord-logo"
106
- }
107
- ]
108
- }
109
- }
110
- }
111
- ```
112
-
113
- ## Notice Banner
114
-
115
- Display a site-wide notice:
116
-
117
- ```json
118
- {
119
- "notice": {
120
- "content": "🚀 Check out [what's new](/changelog)!",
121
- "dismissible": true,
122
- "background": "#1e293b"
123
- }
124
- }
125
- ```
126
-
127
- ## Redirects
128
-
129
- Set up URL redirects:
130
-
131
- ```json
132
- {
133
- "redirects": [
134
- {
135
- "source": "/old-page",
136
- "destination": "/new-page"
137
- }
138
- ]
139
- }
140
- ```
141
-
142
- ## Environment Variables
143
-
144
- For sensitive configuration, use environment variables:
145
-
146
- | Variable | Description |
147
- |----------|-------------|
148
- | `STARTER_PATH` | Override content directory path |
149
- | `PORT` | Server port (default: 3000) |
@@ -1,96 +0,0 @@
1
- ---
2
- title: Overview
3
- description: Learn the core concepts of your documentation
4
- ---
5
-
6
- # Overview
7
-
8
- This guide covers the core concepts you need to know to build great documentation.
9
-
10
- ## Writing Content
11
-
12
- All documentation is written in **MDX** - Markdown with JSX support. This means you can use standard Markdown syntax plus custom React components.
13
-
14
- ### Markdown Basics
15
-
16
- ```markdown
17
- # Heading 1
18
- ## Heading 2
19
- ### Heading 3
20
-
21
- **Bold text** and *italic text*
22
-
23
- - Bullet point
24
- - Another point
25
-
26
- 1. Numbered list
27
- 2. Second item
28
-
29
- [Link text](https://example.com)
30
-
31
- `inline code`
32
- ```
33
-
34
- ### Code Blocks
35
-
36
- Use fenced code blocks with language highlighting:
37
-
38
- ```javascript title="example.js"
39
- function greet(name) {
40
- console.log(`Hello, ${name}!`);
41
- }
42
-
43
- greet('World');
44
- ```
45
-
46
- ## Components
47
-
48
- DevDoc provides built-in components to enhance your documentation.
49
-
50
- ### Notes and Callouts
51
-
52
- <Note>
53
- This is a note for important information.
54
- </Note>
55
-
56
- <Warning>
57
- This is a warning for critical information.
58
- </Warning>
59
-
60
- <Tip>
61
- This is a tip for helpful suggestions.
62
- </Tip>
63
-
64
- ### Cards
65
-
66
- <CardGroup cols={2}>
67
- <Card title="Card Title" href="#">
68
- Card description goes here.
69
- </Card>
70
- <Card title="Another Card" href="#">
71
- Another description here.
72
- </Card>
73
- </CardGroup>
74
-
75
- ### Steps
76
-
77
- <Steps>
78
- <Step title="First Step">
79
- Description of the first step.
80
- </Step>
81
- <Step title="Second Step">
82
- Description of the second step.
83
- </Step>
84
- </Steps>
85
-
86
- ### Accordion
87
-
88
- <Accordion title="Click to expand">
89
- Hidden content that can be revealed by clicking.
90
- </Accordion>
91
-
92
- ## Next Steps
93
-
94
- <Card title="Configuration" href="/guides/configuration">
95
- Learn how to customize your documentation site.
96
- </Card>
@@ -1,39 +0,0 @@
1
- ---
2
- title: Welcome
3
- description: Welcome to your documentation
4
- ---
5
-
6
- # Welcome to Your Documentation
7
-
8
- This is your documentation homepage. Edit this file at `index.mdx` to customize it.
9
-
10
- ## Getting Started
11
-
12
- <CardGroup cols={2}>
13
- <Card title="Quickstart" href="/quickstart">
14
- Get up and running in minutes
15
- </Card>
16
- <Card title="Guides" href="/guides/overview">
17
- Learn the core concepts
18
- </Card>
19
- </CardGroup>
20
-
21
- ## Features
22
-
23
- <Steps>
24
- <Step title="Write in MDX">
25
- Use Markdown with React components for rich documentation
26
- </Step>
27
- <Step title="Preview Locally">
28
- Run `npm run dev` to see changes instantly
29
- </Step>
30
- <Step title="Deploy">
31
- Push to GitHub and deploy automatically with Vercel
32
- </Step>
33
- </Steps>
34
-
35
- ## Need Help?
36
-
37
- <Note>
38
- Check out our [guides](/guides/overview) for detailed documentation on all features.
39
- </Note>
@@ -1,14 +0,0 @@
1
- {
2
- "name": "my-docs",
3
- "version": "0.1.0",
4
- "private": true,
5
- "scripts": {
6
- "dev": "devdoc dev",
7
- "build": "devdoc build",
8
- "start": "devdoc start",
9
- "check": "devdoc check"
10
- },
11
- "dependencies": {
12
- "@brainfish-ai/devdoc": "latest"
13
- }
14
- }
@@ -1,92 +0,0 @@
1
- ---
2
- title: Quickstart
3
- description: Get up and running with your documentation in minutes
4
- ---
5
-
6
- # Quickstart
7
-
8
- Get your documentation site up and running in just a few minutes.
9
-
10
- ## Prerequisites
11
-
12
- Make sure you have the following installed:
13
-
14
- - [Node.js](https://nodejs.org/) 18.0 or later
15
- - npm or yarn
16
-
17
- ## Installation
18
-
19
- <Steps>
20
- <Step title="Clone the template">
21
- ```bash
22
- git clone https://github.com/your-org/your-docs.git
23
- cd your-docs
24
- ```
25
- </Step>
26
-
27
- <Step title="Install dependencies">
28
- ```bash
29
- npm install
30
- ```
31
- </Step>
32
-
33
- <Step title="Start the development server">
34
- ```bash
35
- npm run dev
36
- ```
37
-
38
- Open [http://localhost:3000](http://localhost:3000) in your browser.
39
- </Step>
40
- </Steps>
41
-
42
- ## Project Structure
43
-
44
- ```
45
- your-docs/
46
- ├── docs.json # Configuration file
47
- ├── index.mdx # Homepage
48
- ├── quickstart.mdx # This page
49
- ├── guides/ # Guide pages
50
- │ ├── overview.mdx
51
- │ └── configuration.mdx
52
- ├── public/ # Static assets
53
- │ ├── logo.svg
54
- │ └── favicon.svg
55
- └── package.json
56
- ```
57
-
58
- ## Configuration
59
-
60
- Edit `docs.json` to customize your documentation:
61
-
62
- ```json
63
- {
64
- "name": "My Documentation",
65
- "logo": "/logo.svg",
66
- "navigation": {
67
- "tabs": [
68
- {
69
- "tab": "Documentation",
70
- "type": "docs",
71
- "groups": [
72
- {
73
- "group": "Getting Started",
74
- "pages": ["index", "quickstart"]
75
- }
76
- ]
77
- }
78
- ]
79
- }
80
- }
81
- ```
82
-
83
- ## Next Steps
84
-
85
- <CardGroup cols={2}>
86
- <Card title="Configuration Guide" href="/guides/configuration">
87
- Learn how to customize your docs
88
- </Card>
89
- <Card title="Overview" href="/guides/overview">
90
- Understand the core concepts
91
- </Card>
92
- </CardGroup>
@@ -1,6 +0,0 @@
1
- {
2
- "buildCommand": "npm run build",
3
- "outputDirectory": "dist",
4
- "installCommand": "npm install",
5
- "framework": null
6
- }
@@ -1,139 +0,0 @@
1
- # My Documentation
2
-
3
- Documentation site built with [DevDoc](https://github.com/brainfish-ai/devdoc).
4
-
5
- [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/brainfish-ai/devdoc-starter)
6
-
7
- ## Quick Start
8
-
9
- ### Prerequisites
10
-
11
- - [Node.js](https://nodejs.org/) 18.0 or later
12
- - npm, yarn, or pnpm
13
-
14
- ### Installation
15
-
16
- 1. **Clone this repository**
17
-
18
- ```bash
19
- git clone https://github.com/your-username/your-docs.git
20
- cd your-docs
21
- ```
22
-
23
- Or use the GitHub template button above.
24
-
25
- 2. **Install dependencies**
26
-
27
- ```bash
28
- npm install
29
- ```
30
-
31
- 3. **Start the development server**
32
-
33
- ```bash
34
- npm run dev
35
- ```
36
-
37
- 4. **Open your browser**
38
-
39
- Visit [http://localhost:3000](http://localhost:3000) to see your docs.
40
-
41
- ## Project Structure
42
-
43
- ```
44
- .
45
- ├── docs.json # Site configuration
46
- ├── index.mdx # Homepage
47
- ├── quickstart.mdx # Quickstart guide
48
- ├── guides/
49
- │ ├── overview.mdx # Overview page
50
- │ └── configuration.mdx # Configuration guide
51
- ├── public/
52
- │ ├── logo.svg # Site logo
53
- │ └── favicon.svg # Favicon
54
- ├── package.json
55
- ├── vercel.json # Vercel deployment config
56
- └── README.md
57
- ```
58
-
59
- ## Configuration
60
-
61
- Edit `docs.json` to customize your site:
62
-
63
- ```json
64
- {
65
- "name": "My Documentation",
66
- "logo": "/logo.svg",
67
- "navigation": {
68
- "tabs": [
69
- {
70
- "tab": "Documentation",
71
- "type": "docs",
72
- "groups": [
73
- {
74
- "group": "Getting Started",
75
- "pages": ["index", "quickstart"]
76
- }
77
- ]
78
- }
79
- ]
80
- }
81
- }
82
- ```
83
-
84
- ## Writing Content
85
-
86
- Create `.mdx` files with frontmatter:
87
-
88
- ```mdx
89
- ---
90
- title: Page Title
91
- description: Page description for SEO
92
- ---
93
-
94
- # Your Content Here
95
-
96
- Write Markdown with React components.
97
-
98
- <Note>
99
- Use components like Note, Card, Steps, and more.
100
- </Note>
101
- ```
102
-
103
- ## Available Commands
104
-
105
- | Command | Description |
106
- |---------|-------------|
107
- | `npm run dev` | Start development server |
108
- | `npm run build` | Build for production |
109
- | `npm run start` | Start production server |
110
- | `npm run check` | Validate configuration |
111
-
112
- ## Deployment
113
-
114
- ### Vercel (Recommended)
115
-
116
- Click the "Deploy with Vercel" button above, or:
117
-
118
- 1. Push your code to GitHub
119
- 2. Import the repository in [Vercel](https://vercel.com)
120
- 3. Deploy!
121
-
122
- ### Other Platforms
123
-
124
- ```bash
125
- # Build the site
126
- npm run build
127
-
128
- # Output is in the dist/ directory
129
- ```
130
-
131
- ## Learn More
132
-
133
- - [DevDoc Documentation](https://devdoc.sh/docs)
134
- - [MDX Documentation](https://mdxjs.com/)
135
- - [Vercel Documentation](https://vercel.com/docs)
136
-
137
- ## License
138
-
139
- MIT