From 161311a80f13a02d960d812465e62f5421d814eb Mon Sep 17 00:00:00 2001 From: Rishabh Date: Mon, 30 Mar 2026 14:45:09 +0530 Subject: [PATCH 1/6] feat: add build scripts for CLI and docs Co-Authored-By: Claude Opus 4.6 (1M context) --- package.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package.json b/package.json index 61028e4..35e98bd 100644 --- a/package.json +++ b/package.json @@ -4,5 +4,10 @@ "workspaces": ["packages/*", "examples/*"], "engines": { "node": ">=22" + }, + "scripts": { + "build:cli": "bun run --filter @raystack/chronicle build:cli", + "postbuild:cli": "cd packages/chronicle && bun link", + "build:docs": "chronicle build --content docs" } } From 5e6167397279b72d2f96a53409699a98220306fd Mon Sep 17 00:00:00 2001 From: Rishabh Date: Mon, 30 Mar 2026 14:46:01 +0530 Subject: [PATCH 2/6] chore: add build output dirs to gitignore Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index a1b951b..5153306 100644 --- a/.gitignore +++ b/.gitignore @@ -134,4 +134,6 @@ dist .pnp.* dist +.output/ +.vercel/ examples/frontier From ba49b04434af6da73097fa93c0298c3a21c6a34f Mon Sep 17 00:00:00 2001 From: Rishabh Date: Mon, 30 Mar 2026 15:17:14 +0530 Subject: [PATCH 3/6] docs: update documentation to reflect Vite + Nitro migration Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/cli.mdx | 21 ++++++++++++------- docs/components.mdx | 4 ++-- docs/configuration.mdx | 46 ++++++++++++++++++++++++++++++++++++++++++ docs/frontmatter.mdx | 8 ++++++++ docs/index.mdx | 9 ++++----- docs/themes.mdx | 1 + 6 files changed, 75 insertions(+), 14 deletions(-) diff --git a/docs/cli.mdx b/docs/cli.mdx index 84d87d4..f546a9f 100644 --- a/docs/cli.mdx +++ b/docs/cli.mdx @@ -23,15 +23,13 @@ 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] @@ -39,16 +37,22 @@ chronicle dev [options] | Flag | Description | Default | |------|-------------|---------| +| `-c, --content ` | Content directory | `content` | | `-p, --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 ` | Content directory | `content` | +| `--preset ` | Deploy preset (`vercel`, `cloudflare`, `node-server`) | — | + ## start Start the production server. Requires a prior `chronicle build`. @@ -59,11 +63,12 @@ chronicle start [options] | Flag | Description | Default | |------|-------------|---------| +| `-c, --content ` | Content directory | `content` | | `-p, --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] @@ -71,7 +76,9 @@ chronicle serve [options] | Flag | Description | Default | |------|-------------|---------| +| `-c, --content ` | Content directory | `content` | | `-p, --port ` | Port number | `3000` | +| `--preset ` | Deploy preset (`vercel`, `cloudflare`, `node-server`) | — | ## Config Resolution diff --git a/docs/components.mdx b/docs/components.mdx index 11d2622..9976667 100644 --- a/docs/components.mdx +++ b/docs/components.mdx @@ -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 `` tag ## Links @@ -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 diff --git a/docs/configuration.mdx b/docs/configuration.mdx index 789d011..fd93fa9 100644 --- a/docs/configuration.mdx +++ b/docs/configuration.mdx @@ -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 @@ -51,6 +52,14 @@ api: type: apiKey header: Authorization placeholder: "Bearer token" + +llms: + enabled: true + +analytics: + enabled: true + googleAnalytics: + measurementId: G-XXXXXXXXXX ``` ## Reference @@ -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. @@ -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: diff --git a/docs/frontmatter.mdx b/docs/frontmatter.mdx index ad4abb6..7ea8440 100644 --- a/docs/frontmatter.mdx +++ b/docs/frontmatter.mdx @@ -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" +``` + ## Navigation Ordering Sidebar navigation is determined by: diff --git a/docs/index.mdx b/docs/index.mdx index 5baaa03..4240051 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -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 @@ -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/`): @@ -55,7 +54,7 @@ my-docs/ │ └── guides/ │ ├── installation.mdx │ └── configuration.mdx -└── .chronicle/ # generated, gitignored +└── .output/ # build output, gitignored ``` ### 4. Build for production @@ -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. diff --git a/docs/themes.mdx b/docs/themes.mdx index 74ab076..251293b 100644 --- a/docs/themes.mdx +++ b/docs/themes.mdx @@ -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) From e0b4e2e06a673bfc66518626cf05f99cb2196c1d Mon Sep 17 00:00:00 2001 From: Rishabh Date: Mon, 30 Mar 2026 15:21:44 +0530 Subject: [PATCH 4/6] fix: pin nitro version to 3.0.260311-beta Co-Authored-By: Claude Opus 4.6 (1M context) --- packages/chronicle/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/chronicle/package.json b/packages/chronicle/package.json index a23682e..2df1a4a 100644 --- a/packages/chronicle/package.json +++ b/packages/chronicle/package.json @@ -51,7 +51,7 @@ "lodash": "^4.17.23", "mermaid": "^11.13.0", "minisearch": "^7.2.0", - "nitro": "latest", + "nitro": "3.0.260311-beta", "openapi-types": "^12.1.3", "react": "^19.0.0", "react-dom": "^19.0.0", From f3ef00063eb7c25028235979fe01e438cf91de62 Mon Sep 17 00:00:00 2001 From: Rishabh Date: Mon, 30 Mar 2026 15:43:53 +0530 Subject: [PATCH 5/6] chore: update build command --- bun.lock | 2 +- package.json | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bun.lock b/bun.lock index 5042c56..197d76d 100644 --- a/bun.lock +++ b/bun.lock @@ -32,7 +32,7 @@ "lodash": "^4.17.23", "mermaid": "^11.13.0", "minisearch": "^7.2.0", - "nitro": "latest", + "nitro": "3.0.260311-beta", "openapi-types": "^12.1.3", "react": "^19.0.0", "react-dom": "^19.0.0", diff --git a/package.json b/package.json index 35e98bd..3b3e54d 100644 --- a/package.json +++ b/package.json @@ -1,13 +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", - "postbuild:cli": "cd packages/chronicle && bun link", - "build:docs": "chronicle build --content docs" + "build:docs": "./packages/chronicle/bin/chronicle.js build --content docs" } } From 190588d2f7696d5c9b43d224d4d8421a067ed0c2 Mon Sep 17 00:00:00 2001 From: Rishabh Date: Mon, 30 Mar 2026 15:44:07 +0530 Subject: [PATCH 6/6] feat: add vercel.json file --- vercel.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 vercel.json diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..47e057a --- /dev/null +++ b/vercel.json @@ -0,0 +1,5 @@ +{ + "installCommand": "bun install", + "buildCommand": "bun run build:cli && bun run build:docs -- --preset vercel", + "outputDirectory": ".vercel/output" +}