Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,6 @@ dist
.pnp.*

dist
.output/
.vercel/
examples/frontier
2 changes: 1 addition & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 14 additions & 7 deletions docs/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,36 @@ chronicle init [options]
This creates:
- `chronicle.yaml` — site configuration
- `content/` (or custom name) — content directory with a sample `index.mdx`
- `package.json` — with `@raystack/chronicle` dependency (if not exists)
- `.chronicle/` — scaffolded build directory
- `.gitignore` — with `.chronicle` entry
- `.gitignore` — with `node_modules`, `dist`, `.output` entries

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

## dev

Start the development server with hot reload. Requires `chronicle init` first.
Start the development server with hot reload.

```bash
chronicle dev [options]
```

| Flag | Description | Default |
|------|-------------|---------|
| `-c, --content <path>` | Content directory | `content` |
| `-p, --port <port>` | Port number | `3000` |

## build

Build the site for production. Requires `chronicle init` first.
Build the site for production.

```bash
chronicle build
chronicle build [options]
```

| Flag | Description | Default |
|------|-------------|---------|
| `-c, --content <path>` | Content directory | `content` |
| `--preset <preset>` | Deploy preset (`vercel`, `cloudflare`, `node-server`) | — |

## start

Start the production server. Requires a prior `chronicle build`.
Expand All @@ -59,19 +63,22 @@ chronicle start [options]

| Flag | Description | Default |
|------|-------------|---------|
| `-c, --content <path>` | Content directory | `content` |
| `-p, --port <port>` | Port number | `3000` |

## serve

Build and start the production server in one step. Requires `chronicle init` first.
Build and start the production server in one step.

```bash
chronicle serve [options]
```

| Flag | Description | Default |
|------|-------------|---------|
| `-c, --content <path>` | Content directory | `content` |
| `-p, --port <port>` | Port number | `3000` |
| `--preset <preset>` | Deploy preset (`vercel`, `cloudflare`, `node-server`) | — |

## Config Resolution

Expand Down
4 changes: 2 additions & 2 deletions docs/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Images support both local and external sources:
![External image](https://example.com/image.png)
```

- **Local images** — Rendered with Next.js `Image` component (optimized, default 800x400)
- **Local images** — Rendered with optimized `Image` component (default 800x400)
- **External images** — Rendered with standard `<img>` tag
Comment on lines +161 to 162
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Docs are still framework-inconsistent in this page.

Good update here, but this page still says “Next.js optimized for local” at Line 206 (<img> row in HTML overrides table). Please align that line too so the page doesn’t mix framework-agnostic and Next.js-specific wording.

Also applies to: 174-174

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/components.mdx` around lines 161 - 162, The docs page mixes
framework-specific Next.js wording with framework-agnostic language; update the
table entries that mention Next.js/`<img>` to use neutral phrasing: change the
HTML row that references the `<img>` tag and any line containing “Next.js
optimized” to instead say “optimized Image component” (or similar neutral copy)
for local images and “standard <img> tag” for external images so the page
consistently uses framework-agnostic wording; locate and edit the table cell
text matching the strings "Local images — Rendered with optimized `Image`
component (default 800x400)" and "External images — Rendered with standard
`<img>` tag" and the HTML `<img>` row to ensure consistent phrasing.


## Links
Expand All @@ -171,7 +171,7 @@ Links are automatically handled:
[Anchor link](#section)
```

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

Expand Down
46 changes: 46 additions & 0 deletions docs/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ All site configuration lives in a single `chronicle.yaml` file in your content d
```yaml
title: My Project Docs
description: Documentation for My Project
url: https://docs.example.com

logo:
light: ./logo-light.png
Expand Down Expand Up @@ -51,6 +52,14 @@ api:
type: apiKey
header: Authorization
placeholder: "Bearer token"

llms:
enabled: true

analytics:
enabled: true
googleAnalytics:
measurementId: G-XXXXXXXXXX
```

## Reference
Expand All @@ -63,6 +72,14 @@ api:
title: My Documentation
```

### url

Optional site URL. Used for SEO metadata, sitemap, and canonical URLs.

```yaml
url: https://docs.example.com
```

### description

Optional meta description for SEO.
Expand Down Expand Up @@ -203,6 +220,35 @@ Each entry in the `api` array creates a section of API documentation.

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

### llms

Configuration for LLM-friendly content generation. When enabled, Chronicle generates `/llms.txt` and `/llms-full.txt` endpoints.

```yaml
llms:
enabled: true
```

| Field | Type | Description | Default |
|-------|------|-------------|---------|
| `enabled` | `boolean` | Enable/disable LLM content endpoints | `false` |

### analytics

Analytics integration for tracking page views.

```yaml
analytics:
enabled: true
googleAnalytics:
measurementId: G-XXXXXXXXXX
```

| Field | Type | Description | Default |
|-------|------|-------------|---------|
| `enabled` | `boolean` | Enable/disable analytics | `false` |
| `googleAnalytics.measurementId` | `string` | Google Analytics measurement ID | — |

## Defaults

If `chronicle.yaml` is missing or fields are omitted, these defaults apply:
Expand Down
8 changes: 8 additions & 0 deletions docs/frontmatter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ icon: rectangle-stack
| `method-delete` | HTTP DELETE badge |
| `method-patch` | HTTP PATCH badge |

### lastModified

Optional date string indicating when the page was last updated.

```yaml
lastModified: "2026-03-30"
```
Comment on lines +83 to +87
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

lastModified format should be constrained to avoid sitemap runtime failures.

“Optional date string” is too broad. Since sitemap generation converts this value with new Date(...).toISOString(), invalid formats can crash the sitemap route. Please document a strict ISO-8601 format (e.g., YYYY-MM-DD or full ISO datetime).

✏️ Suggested doc fix
-Optional date string indicating when the page was last updated.
+Optional ISO-8601 date string indicating when the page was last updated (recommended: `YYYY-MM-DD`).

 ```yaml
 lastModified: "2026-03-30"
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion
Optional ISO-8601 date string indicating when the page was last updated (recommended: `YYYY-MM-DD`).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/frontmatter.mdx` around lines 83 - 87, Update the frontmatter docs to
constrain the lastModified field to a strict ISO-8601 format because the sitemap
generation uses new Date(...).toISOString(); change the description for the
lastModified entry (the "lastModified" frontmatter key) to require either a
date-only format (YYYY-MM-DD) or a full ISO datetime (e.g.,
YYYY-MM-DDTHH:MM:SSZ), and add one or two examples showing both allowed formats
so consumers know what to pass.


## Navigation Ordering

Sidebar navigation is determined by:
Expand Down
9 changes: 4 additions & 5 deletions docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ order: 1

# Getting Started

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.
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.

## Installation

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

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

Expand Down Expand Up @@ -55,7 +54,7 @@ my-docs/
│ └── guides/
│ ├── installation.mdx
│ └── configuration.mdx
└── .chronicle/ # generated, gitignored
└── .output/ # build output, gitignored
```

### 4. Build for production
Expand All @@ -82,7 +81,7 @@ my-docs/
│ ├── index.mdx # Home page
│ └── guides/
│ └── setup.mdx # Nested page at /guides/setup
└── .chronicle/ # Generated by init, gitignored
└── .output/ # Build output, gitignored
```

All configuration is done through `chronicle.yaml`. No additional config files needed.
Expand Down
1 change: 1 addition & 0 deletions docs/themes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ theme:
- Minimal, distraction-free design
- Reading progress tracking
- Optimized typography for long content
- Light mode only (dark mode toggle is disabled)
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
{
"name": "chronicle",
"private": true,
"workspaces": ["packages/*", "examples/*"],
"workspaces": [
"packages/*",
"examples/*"
],
"engines": {
"node": ">=22"
},
"scripts": {
"build:cli": "bun run --filter @raystack/chronicle build:cli",
"build:docs": "./packages/chronicle/bin/chronicle.js build --content docs"
}
}
2 changes: 1 addition & 1 deletion packages/chronicle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"lodash": "^4.17.23",
"mermaid": "^11.13.0",
"minisearch": "^7.2.0",
"nitro": "latest",
"nitro": "3.0.260311-beta",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Nitro release notes: what changed in version 3.0.260311-beta, and what is the latest stable Nitro 3.x release? Please include any known breaking changes or regressions affecting nitro/vite.

💡 Result:

In version 3.0.260311-beta of Nitro (nitrojs/nitro), key changes include: 🚀 Enhancements: - Export http utils from nitro (#4097) - vite: Support preview (#4090), respect vite mode for env loading (#4082), auto-detect client entry (#4059), use srvx loader for preview (#3999) - nitro deploy command (#4042), nitro preview (#4024) - tasks: Expose req and waitUntil in context (#4037) - Support zstd for compressPublicAssets (#3934) 🔥 Performance: - Optimize duplicate handler filtering (#4003) 🩹 Fixes: - config: Apply $production/$development layers when NODE_ENV unset (#4066) - vite: Avoid duplicate nitro plugins on nitro build, run scheduled tasks during vite dev (#4076), remove keep-alive header from worker, remove chunk config when inlineDynamicImports enabled, use sec-websocket-protocol to detect Vite WS (#4098) - Migrate to unjs/ocache (#4087), improve builder auto-detection (#4058) 📖 Documentation: - cloudflare: Fix env bindings access pattern for Nitro v3 (breaking change) (#4064) 🌊 Types and Preset Changes: - Various type updates and new presets like zephyr (#4038) The latest stable Nitro 3.x release: There is no stable 3.x release yet; 3.0.260311-beta (Mar 11, 2026) is the latest beta. The overall latest stable is v2.13.2 (Mar 20, 2026) from the v2 branch. Docs explicitly note "For the current stable release, see Nitro v2." Known breaking changes/regressions affecting nitro/vite: In v3 beta broadly - package rename nitropack → nitro, imports nitropack/runtime/* → nitro/*, eventHandler → defineHandler (H3 v2), createError → HTTPError, Node.js min v20. In this specific beta: cloudflare env bindings access pattern changed (noted as breaking). Vite-related fixes suggest prior issues with duplicate plugins, WS detection, preview support - no explicit regressions mentioned, mostly enhancements/fixes for nitro/vite integration.

Citations:


Consider using Nitro v2.13.2 (latest stable) or justify the v3 beta requirement.

Version 3.0.260311-beta is the latest v3 release, but v3 is still pre-release with breaking changes (package rename, import paths, Node.js v20 minimum, cloudflare env bindings). The latest stable release is Nitro v2.13.2. While the beta includes vite integration improvements (not regressions), using a pre-release in runtime dependencies is risky.

Either upgrade to v2.13.2 if compatible, or document why v3 is required and confirm your Vite/Nitro integration has been tested against this specific beta before release.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/chronicle/package.json` at line 54, The package.json currently pins
"nitro": "3.0.260311-beta" which is a pre-release; either change the dependency
to the latest stable "2.13.2" or add a short justification and testing note in
the repo (e.g., in README or CHANGELOG) explaining why Nitro v3 beta is required
and listing compatibility checks performed (Vite/Nitro integration, Node v20
requirement, import/path changes, cloud provider bindings); update the "nitro"
entry or add the justification referencing the package.json "nitro" key and any
test scripts or docs you used to validate the beta.

"openapi-types": "^12.1.3",
"react": "^19.0.0",
"react-dom": "^19.0.0",
Expand Down
5 changes: 5 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"installCommand": "bun install",
"buildCommand": "bun run build:cli && bun run build:docs -- --preset vercel",
"outputDirectory": ".vercel/output"
}