Skip to content

Commit ca271b9

Browse files
rsbhclaude
andauthored
docs: add Chronicle documentation site (#20)
* docs: add Chronicle documentation site Add docs/ folder with MDX documentation pages: - Getting Started (install, quick start, project structure) - CLI Commands (init, dev, build, start, serve) - Configuration (full chronicle.yaml reference) - Frontmatter (title, description, order, icon) - Components (callouts, tabs, mermaid, code blocks, tables, images) - Themes (default and paper) - chronicle.yaml with paper theme and llms enabled Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: add Docker usage documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: add README with features, quick start, and contributing guide Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: use bun instead of node in README Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: use bun/bunx everywhere, simplify install instructions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: use bin directly without build step in README Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8265e8e commit ca271b9

File tree

9 files changed

+953
-0
lines changed

9 files changed

+953
-0
lines changed

README.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Chronicle
2+
3+
Config-driven documentation framework built on Next.js, Fumadocs, and Apsara UI.
4+
5+
## Features
6+
7+
- **Config-driven** — Single `chronicle.yaml` for all site configuration
8+
- **Themeable** — Built-in themes: `default` (sidebar + TOC) and `paper` (book-style)
9+
- **MDX** — Write docs in MDX with callouts, tabs, mermaid diagrams, and syntax highlighting
10+
- **API docs** — Interactive OpenAPI documentation with "Try it out" panel
11+
- **LLMs** — Auto-generate `/llms.txt` and `/llms-full.txt` for AI consumption
12+
- **CLI**`init`, `dev`, `build`, `start`, `serve` commands
13+
14+
## Quick Start
15+
16+
### Install
17+
18+
```bash
19+
bun add @raystack/chronicle
20+
```
21+
22+
Or run directly without installing:
23+
24+
```bash
25+
bunx @raystack/chronicle init
26+
```
27+
28+
### Initialize
29+
30+
```bash
31+
chronicle init
32+
```
33+
34+
Creates a `chronicle.yaml` and sample `index.mdx`.
35+
36+
### Develop
37+
38+
```bash
39+
chronicle dev
40+
```
41+
42+
Open [http://localhost:3000](http://localhost:3000).
43+
44+
### Build for production
45+
46+
```bash
47+
chronicle build
48+
chronicle start
49+
```
50+
51+
## Contributing
52+
53+
We welcome contributions! Here's how to get started:
54+
55+
### Prerequisites
56+
57+
- [Node.js](https://nodejs.org/) >= 22
58+
- [Bun](https://bun.sh/) >= 1.3
59+
60+
### Running Locally
61+
62+
1. Fork and clone the repository
63+
64+
```bash
65+
git clone https://github.com/<your-username>/chronicle.git
66+
cd chronicle
67+
```
68+
69+
2. Install dependencies
70+
71+
```bash
72+
bun install
73+
```
74+
75+
3. Run the dev server
76+
77+
```bash
78+
cd docs && bun ../packages/chronicle/bin/chronicle.js dev
79+
```
80+
81+
Open [http://localhost:3000](http://localhost:3000) to see the docs site.
82+
83+
### Making Changes
84+
85+
1. Create a branch from `main`
86+
2. Make your changes
87+
3. Test locally from the `docs/` directory
88+
4. Open a pull request
89+
90+
## License
91+
92+
[Apache-2.0](LICENSE)

docs/chronicle.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
title: Chronicle
2+
description: Config-driven documentation framework
3+
4+
theme:
5+
name: paper
6+
7+
navigation:
8+
links:
9+
- label: GitHub
10+
href: https://github.com/raystack/chronicle
11+
12+
search:
13+
enabled: true
14+
placeholder: Search docs...
15+
16+
llms:
17+
enabled: true
18+
19+
footer:
20+
copyright: "© 2026 Raystack. All rights reserved."
21+
links:
22+
- label: GitHub
23+
href: https://github.com/raystack/chronicle

docs/cli.mdx

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
title: CLI Commands
3+
description: Chronicle CLI commands reference.
4+
order: 2
5+
---
6+
7+
# CLI Commands
8+
9+
Chronicle provides a CLI to initialize, develop, build, and serve your documentation site.
10+
11+
## init
12+
13+
Scaffold a new Chronicle project.
14+
15+
```bash
16+
chronicle init [options]
17+
```
18+
19+
| Flag | Description | Default |
20+
|------|-------------|---------|
21+
| `-d, --dir <path>` | Target directory | `.` (current directory) |
22+
23+
Creates a `chronicle.yaml` config file and a sample `index.mdx` in the specified directory.
24+
25+
## dev
26+
27+
Start the development server with hot reload.
28+
29+
```bash
30+
chronicle dev [options]
31+
```
32+
33+
| Flag | Description | Default |
34+
|------|-------------|---------|
35+
| `-p, --port <port>` | Port number | `3000` |
36+
| `-c, --content <path>` | Content directory | Current directory |
37+
38+
## build
39+
40+
Build the site for production.
41+
42+
```bash
43+
chronicle build [options]
44+
```
45+
46+
| Flag | Description | Default |
47+
|------|-------------|---------|
48+
| `-c, --content <path>` | Content directory | Current directory |
49+
50+
## start
51+
52+
Start the production server. Requires a prior `chronicle build`.
53+
54+
```bash
55+
chronicle start [options]
56+
```
57+
58+
| Flag | Description | Default |
59+
|------|-------------|---------|
60+
| `-p, --port <port>` | Port number | `3000` |
61+
| `-c, --content <path>` | Content directory | Current directory |
62+
63+
## serve
64+
65+
Build and start the production server in one step.
66+
67+
```bash
68+
chronicle serve [options]
69+
```
70+
71+
| Flag | Description | Default |
72+
|------|-------------|---------|
73+
| `-p, --port <port>` | Port number | `3000` |
74+
| `-c, --content <path>` | Content directory | Current directory |
75+
76+
## Content Directory Resolution
77+
78+
The content directory is resolved in this order:
79+
80+
1. `--content` CLI flag (highest priority)
81+
2. `CHRONICLE_CONTENT_DIR` environment variable
82+
3. Current working directory (default)
83+
84+
The content directory must contain a `chronicle.yaml` file.

0 commit comments

Comments
 (0)