Skip to content

Commit 040ceeb

Browse files
Initial commit: Barodoc documentation framework
- @barodoc/core: Astro integration and config loader - @barodoc/theme-docs: Documentation theme with MDX components - barodoc CLI: serve, build, preview, create commands - Plugin system: sitemap, search, analytics plugins - Full i18n support with multiple locales - Skills documentation for AI assistance Co-authored-by: Cursor <cursoragent@cursor.com>
0 parents  commit 040ceeb

101 files changed

Lines changed: 12925 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/config.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [
7+
["@barodoc/core", "@barodoc/theme-docs"]
8+
],
9+
"access": "public",
10+
"baseBranch": "main",
11+
"updateInternalDependencies": "patch",
12+
"ignore": []
13+
}

.cursor/rules/components.mdc

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Component Usage Rules
2+
3+
## Astro Components (.astro)
4+
- Use for static content
5+
- Props defined in frontmatter script
6+
- No client-side JavaScript by default
7+
8+
## React Components (.tsx)
9+
- Use for interactive content
10+
- Must use `client:load` directive in Astro files:
11+
12+
```astro
13+
<MyComponent client:load />
14+
```
15+
16+
## MDX Components
17+
18+
### Callout
19+
```mdx
20+
<Callout type="info" title="Optional Title">
21+
Content here
22+
</Callout>
23+
```
24+
25+
### Card & CardGroup
26+
```mdx
27+
<CardGroup cols={2}>
28+
<Card title="Title" icon="🚀" href="/link">
29+
Description
30+
</Card>
31+
</CardGroup>
32+
```
33+
34+
### Steps
35+
```mdx
36+
<Steps>
37+
<Step title="Step 1">
38+
Instructions
39+
</Step>
40+
</Steps>
41+
```
42+
43+
## API Components
44+
45+
### ApiEndpoint
46+
```mdx
47+
<ApiEndpoint method="GET" path="/api/endpoint" description="Description">
48+
<ApiParams>
49+
<ApiParam name="param" type="string" required description="Param desc" />
50+
</ApiParams>
51+
<ApiResponse status={200} description="Success">
52+
```json
53+
{ "result": "value" }
54+
```
55+
</ApiResponse>
56+
</ApiEndpoint>
57+
```
58+
59+
## Styling
60+
- Use Tailwind classes
61+
- Custom component styling in global.css with @layer components
62+
- Use CSS custom properties for theme colors

.cursor/rules/config.mdc

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Configuration Rules
2+
3+
## barodoc.config.json
4+
5+
### Required Fields
6+
- `name`: Site name displayed in header
7+
- `navigation`: Array of navigation groups
8+
9+
### Optional Fields
10+
- `logo`: Path to logo SVG/PNG in public/
11+
- `favicon`: Path to favicon
12+
- `colors.primary`: Primary color hex code
13+
- `topbar.github`: GitHub repository URL
14+
15+
### Navigation Structure
16+
```json
17+
{
18+
"navigation": [
19+
{
20+
"group": "Group Name",
21+
"pages": ["page1", "nested/page2"]
22+
}
23+
]
24+
}
25+
```
26+
27+
Page slugs map to `src/content/docs/{slug}.mdx`
28+
29+
## astro.config.mjs
30+
31+
### Key Settings
32+
- `site`: Production URL for sitemap/canonical URLs
33+
- `base`: Base path for subdirectory deployment
34+
35+
### For GitHub Pages with Custom Domain
36+
```javascript
37+
export default defineConfig({
38+
site: "https://docs.example.com",
39+
base: "/",
40+
});
41+
```
42+
43+
### For GitHub Pages (username.github.io/repo)
44+
```javascript
45+
export default defineConfig({
46+
site: "https://username.github.io",
47+
base: "/repo-name/",
48+
});
49+
```
50+
51+
## Adding New Pages
52+
1. Create MDX file in `src/content/docs/`
53+
2. Add slug to `barodoc.config.json` navigation
54+
3. File path determines URL: `guides/setup.mdx` → `/docs/guides/setup`

.cursor/rules/docs.mdc

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Documentation Writing Rules
2+
3+
## File Location
4+
- All documentation files go in `src/content/docs/`
5+
- Use subdirectories for organization: `guides/`, `components/`, `api/`
6+
7+
## MDX Frontmatter
8+
Every MDX file must have frontmatter:
9+
10+
```mdx
11+
---
12+
title: "Page Title"
13+
description: "Brief page description"
14+
---
15+
```
16+
17+
## Component Imports
18+
Import components at the top of the file, after frontmatter:
19+
20+
```mdx
21+
---
22+
title: "Title"
23+
---
24+
25+
import Callout from "@/components/mdx/Callout.astro";
26+
import Card from "@/components/mdx/Card.astro";
27+
```
28+
29+
## Callout Types
30+
- `info` - General information
31+
- `tip` - Helpful tips
32+
- `warning` - Warnings, caveats
33+
- `danger` - Critical warnings, breaking changes
34+
35+
## Code Blocks
36+
- Always specify the language
37+
- Use CodeGroup for multi-language examples:
38+
39+
```mdx
40+
<CodeGroup titles={["JavaScript", "TypeScript"]}>
41+
```javascript
42+
const x = 1;
43+
```
44+
45+
```typescript
46+
const x: number = 1;
47+
```
48+
</CodeGroup>
49+
```
50+
51+
## Navigation
52+
After creating a page, add it to `barodoc.config.json`:
53+
54+
```json
55+
{
56+
"navigation": [
57+
{
58+
"group": "Group Name",
59+
"pages": ["page-slug"]
60+
}
61+
]
62+
}
63+
```
64+
65+
Page slug = file path without `.mdx` extension, relative to `src/content/docs/`

0 commit comments

Comments
 (0)