Skip to content

Commit f14c7af

Browse files
rsbhclaude
andauthored
feat: update docs and add vercel.json (#25)
* feat: add build scripts for CLI and docs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: add build output dirs to gitignore Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: update documentation to reflect Vite + Nitro migration Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: pin nitro version to 3.0.260311-beta Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: update build command * feat: add vercel.json file * docs: update cli and config docs for new flags and config fields Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: resolve config content path relative to config file location Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: update README for Vite migration and dev:docs script Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 489c8b0 commit f14c7af

14 files changed

Lines changed: 130 additions & 29 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,6 @@ dist
134134
.pnp.*
135135

136136
dist
137+
.output/
138+
.vercel/
137139
examples/frontier

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Chronicle
22

3-
Config-driven documentation framework built on Next.js, Fumadocs, and Apsara UI.
3+
Config-driven documentation framework built on Vite, Nitro, and Apsara UI.
44

55
## Features
66

@@ -75,7 +75,7 @@ bun install
7575
3. Run the dev server
7676

7777
```bash
78-
cd docs && bun ../packages/chronicle/bin/chronicle.js dev
78+
bun run dev:docs
7979
```
8080

8181
Open [http://localhost:3000](http://localhost:3000) to see the docs site.

bun.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/chronicle.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
title: Chronicle
22
description: Config-driven documentation framework
3+
content: .
34

45
theme:
56
name: paper

docs/cli.mdx

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Chronicle provides a CLI to initialize, develop, build, and serve your documenta
1010

1111
## init
1212

13-
Initialize a new Chronicle project. Must be run before other commands.
13+
Initialize a new Chronicle project.
1414

1515
```bash
1616
chronicle init [options]
@@ -23,32 +23,38 @@ chronicle init [options]
2323
This creates:
2424
- `chronicle.yaml` — site configuration
2525
- `content/` (or custom name) — content directory with a sample `index.mdx`
26-
- `package.json` — with `@raystack/chronicle` dependency (if not exists)
27-
- `.chronicle/` — scaffolded build directory
28-
- `.gitignore` — with `.chronicle` entry
26+
- `.gitignore` — with `node_modules`, `dist`, `.output` entries
2927

3028
If the content directory already exists and has files, the sample `index.mdx` is skipped.
3129

3230
## dev
3331

34-
Start the development server with hot reload. Requires `chronicle init` first.
32+
Start the development server with hot reload.
3533

3634
```bash
3735
chronicle dev [options]
3836
```
3937

4038
| Flag | Description | Default |
4139
|------|-------------|---------|
40+
| `--content <path>` | Content directory | `content` |
41+
| `--config <path>` | Path to `chronicle.yaml` | `./chronicle.yaml` |
4242
| `-p, --port <port>` | Port number | `3000` |
4343

4444
## build
4545

46-
Build the site for production. Requires `chronicle init` first.
46+
Build the site for production.
4747

4848
```bash
49-
chronicle build
49+
chronicle build [options]
5050
```
5151

52+
| Flag | Description | Default |
53+
|------|-------------|---------|
54+
| `--content <path>` | Content directory | `content` |
55+
| `--config <path>` | Path to `chronicle.yaml` | `./chronicle.yaml` |
56+
| `--preset <preset>` | Deploy preset (`vercel`, `cloudflare`, `node-server`) ||
57+
5258
## start
5359

5460
Start the production server. Requires a prior `chronicle build`.
@@ -59,23 +65,30 @@ chronicle start [options]
5965

6066
| Flag | Description | Default |
6167
|------|-------------|---------|
68+
| `--content <path>` | Content directory | `content` |
6269
| `-p, --port <port>` | Port number | `3000` |
6370

6471
## serve
6572

66-
Build and start the production server in one step. Requires `chronicle init` first.
73+
Build and start the production server in one step.
6774

6875
```bash
6976
chronicle serve [options]
7077
```
7178

7279
| Flag | Description | Default |
7380
|------|-------------|---------|
81+
| `--content <path>` | Content directory | `content` |
82+
| `--config <path>` | Path to `chronicle.yaml` | `./chronicle.yaml` |
7483
| `-p, --port <port>` | Port number | `3000` |
84+
| `--preset <preset>` | Deploy preset (`vercel`, `cloudflare`, `node-server`) ||
7585

76-
## Config Resolution
86+
## Resolution Order
7787

78-
`chronicle.yaml` is resolved in this order:
88+
CLI flags take precedence over `chronicle.yaml` values, which take precedence over defaults.
7989

80-
1. Current working directory
81-
2. Content directory
90+
| Option | CLI flag | Config field | Default |
91+
|--------|----------|-------------|---------|
92+
| Content directory | `--content` | `content` | `content` |
93+
| Deploy preset | `--preset` | `preset` ||
94+
| Config path | `--config` || `./chronicle.yaml` |

docs/components.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Images support both local and external sources:
158158
![External image](https://example.com/image.png)
159159
```
160160

161-
- **Local images** — Rendered with Next.js `Image` component (optimized, default 800x400)
161+
- **Local images** — Rendered with optimized `Image` component (default 800x400)
162162
- **External images** — Rendered with standard `<img>` tag
163163

164164
## Links
@@ -171,7 +171,7 @@ Links are automatically handled:
171171
[Anchor link](#section)
172172
```
173173

174-
- **Internal links** — Use Next.js client-side navigation
174+
- **Internal links** — Use client-side navigation
175175
- **External links** — Open in a new tab automatically
176176
- **Anchor links** — Smooth scroll to the section
177177

@@ -203,7 +203,7 @@ Chronicle overrides these HTML elements with styled components:
203203
| HTML Element | Chronicle Component | Notes |
204204
|-------------|-------------------|-------|
205205
| `<p>` | `MdxParagraph` | Auto-converts to `<div>` when containing block elements |
206-
| `<img>` | `Image` | Next.js optimized for local, standard for external |
206+
| `<img>` | `Image` | Optimized for local, standard for external |
207207
| `<a>` | `Link` | Smart routing with external link detection |
208208
| `<code>` | `MdxCode` | Inline code styling |
209209
| `<pre>` | `MdxPre` | Code blocks with optional title header |

docs/configuration.mdx

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ order: 3
66

77
# Configuration
88

9-
All site configuration lives in a single `chronicle.yaml` file in your content directory.
9+
All site configuration lives in a single `chronicle.yaml` file in your project root. The config is validated using Zod — invalid fields will produce clear error messages at startup.
1010

1111
## Full Example
1212

1313
```yaml
1414
title: My Project Docs
1515
description: Documentation for My Project
16+
url: https://docs.example.com
17+
content: docs
18+
preset: vercel
1619

1720
logo:
1821
light: ./logo-light.png
@@ -51,6 +54,14 @@ api:
5154
type: apiKey
5255
header: Authorization
5356
placeholder: "Bearer token"
57+
58+
llms:
59+
enabled: true
60+
61+
analytics:
62+
enabled: true
63+
googleAnalytics:
64+
measurementId: G-XXXXXXXXXX
5465
```
5566
5667
## Reference
@@ -63,6 +74,30 @@ api:
6374
title: My Documentation
6475
```
6576
77+
### url
78+
79+
Optional site URL. Used for SEO metadata, sitemap, and canonical URLs.
80+
81+
```yaml
82+
url: https://docs.example.com
83+
```
84+
85+
### content
86+
87+
Optional content directory path. Can be overridden by the `--content` CLI flag.
88+
89+
```yaml
90+
content: docs
91+
```
92+
93+
### preset
94+
95+
Optional deploy preset. Can be overridden by the `--preset` CLI flag.
96+
97+
```yaml
98+
preset: vercel # vercel, cloudflare, or node-server
99+
```
100+
66101
### description
67102

68103
Optional meta description for SEO.
@@ -203,6 +238,35 @@ Each entry in the `api` array creates a section of API documentation.
203238

204239
API pages include a "Try it out" panel that uses the configured server URL and auth settings.
205240

241+
### llms
242+
243+
Configuration for LLM-friendly content generation. When enabled, Chronicle generates `/llms.txt` and `/llms-full.txt` endpoints.
244+
245+
```yaml
246+
llms:
247+
enabled: true
248+
```
249+
250+
| Field | Type | Description | Default |
251+
|-------|------|-------------|---------|
252+
| `enabled` | `boolean` | Enable/disable LLM content endpoints | `false` |
253+
254+
### analytics
255+
256+
Analytics integration for tracking page views.
257+
258+
```yaml
259+
analytics:
260+
enabled: true
261+
googleAnalytics:
262+
measurementId: G-XXXXXXXXXX
263+
```
264+
265+
| Field | Type | Description | Default |
266+
|-------|------|-------------|---------|
267+
| `enabled` | `boolean` | Enable/disable analytics | `false` |
268+
| `googleAnalytics.measurementId` | `string` | Google Analytics measurement ID | — |
269+
206270
## Defaults
207271

208272
If `chronicle.yaml` is missing or fields are omitted, these defaults apply:

docs/frontmatter.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ icon: rectangle-stack
7878
| `method-delete` | HTTP DELETE badge |
7979
| `method-patch` | HTTP PATCH badge |
8080

81+
### lastModified
82+
83+
Optional date string indicating when the page was last updated.
84+
85+
```yaml
86+
lastModified: "2026-03-30"
87+
```
88+
8189
## Navigation Ordering
8290

8391
Sidebar navigation is determined by:

docs/index.mdx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ order: 1
66

77
# Getting Started
88

9-
Chronicle is a config-driven documentation framework built on Next.js 15, Fumadocs, and Apsara UI components. Write MDX content, configure with a single YAML file, and get a fully themed documentation site.
9+
Chronicle is a config-driven documentation framework built on Vite, Nitro, and Apsara UI components. Write MDX content, configure with a single YAML file, and get a fully themed documentation site.
1010

1111
## Installation
1212

@@ -25,8 +25,7 @@ chronicle init
2525
This creates:
2626
- `chronicle.yaml` — your site configuration
2727
- `content/` — content directory with a sample `index.mdx`
28-
- `package.json` — with `@raystack/chronicle` dependency
29-
- `.chronicle/` — scaffolded build directory (gitignored)
28+
- `.gitignore` — with `node_modules`, `dist`, `.output` entries
3029

3130
To use an existing directory as content (e.g. `docs/`):
3231

@@ -55,7 +54,7 @@ my-docs/
5554
│ └── guides/
5655
│ ├── installation.mdx
5756
│ └── configuration.mdx
58-
└── .chronicle/ # generated, gitignored
57+
└── .output/ # build output, gitignored
5958
```
6059

6160
### 4. Build for production
@@ -82,7 +81,7 @@ my-docs/
8281
│ ├── index.mdx # Home page
8382
│ └── guides/
8483
│ └── setup.mdx # Nested page at /guides/setup
85-
└── .chronicle/ # Generated by init, gitignored
84+
└── .output/ # Build output, gitignored
8685
```
8786

8887
All configuration is done through `chronicle.yaml`. No additional config files needed.

docs/themes.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ theme:
5757
- Minimal, distraction-free design
5858
- Reading progress tracking
5959
- Optimized typography for long content
60+
- Light mode only (dark mode toggle is disabled)

0 commit comments

Comments
 (0)