Skip to content

feat: update docs and add vercel.json#25

Merged
rsbh merged 9 commits intomainfrom
fix_docs
Apr 7, 2026
Merged

feat: update docs and add vercel.json#25
rsbh merged 9 commits intomainfrom
fix_docs

Conversation

@rsbh
Copy link
Copy Markdown
Member

@rsbh rsbh commented Mar 30, 2026

Summary

  • Update documentation to reflect Vite + Nitro migration (remove Next.js references)
  • Document new CLI flags (--config, --content, --preset) and config fields (content, preset)
  • Add resolution order table (CLI flag > config > default) to CLI docs
  • Add Vercel deployment config (vercel.json)
  • Fix config.content path resolution to be relative to config file location (not CWD)
  • Add dev:docs script, update build:docs to use --config flag
  • Pin nitro version to 3.0.260311-beta
  • Add .output/ and .vercel/ to .gitignore

Test plan

  • bun run dev:docs starts dev server with correct content resolution
  • bun run build:docs builds successfully
  • Verify all doc pages render correctly
  • Verify Vercel deployment works with new config

🤖 Generated with Claude Code

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a4345125-c087-435b-a0a0-92ba41238304

📥 Commits

Reviewing files that changed from the base of the PR and between 1baf891 and 78d30f5.

📒 Files selected for processing (1)
  • README.md
✅ Files skipped from review due to trivial changes (1)
  • README.md

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added CLI flags: --content, --config, --preset.
    • New config fields: url, content, preset, llms, analytics (Google Analytics support).
    • Introduced lastModified frontmatter field.
    • Added Vercel deployment configuration.
  • Documentation

    • Docs updated: Vite + Nitro platform, clarified resolution precedence (CLI > config > defaults).
    • Removed framework-specific wording for image/link behaviors.
    • Updated init/docs examples and theme docs (Paper theme: light-only).
  • Chores

    • Added .output/ and .vercel/ to .gitignore; new npm scripts and dependency pin.

Walkthrough

Update docs, CLI, and build config: add new CLI flags and config fields, change content path resolution to be relative to the resolved chronicle.yaml location, add build scripts and Vercel config, pin Nitro, and add .output/ and .vercel/ to .gitignore.

Changes

Cohort / File(s) Summary
CLI config & resolution
packages/chronicle/src/cli/utils/config.ts
Changed resolveContentDir signature to accept configPath; now resolves config.content relative to the directory of the resolved chronicle.yaml; loadCLIConfig passes resolved config path.
Documentation
docs/cli.mdx, docs/components.mdx, docs/configuration.mdx, docs/frontmatter.mdx, docs/index.mdx, docs/themes.mdx, docs/chronicle.yaml
Removed Next.js references; documented new CLI flags (--content, --config, --preset), updated config precedence to CLI flags > chronicle.yaml > defaults, added config fields (url, content, preset, llms, analytics), added lastModified frontmatter, and set docs' content path.
Build scripts & platform config
package.json, packages/chronicle/package.json, vercel.json
Added build:cli, dev:docs, build:docs scripts; pinned nitro to 3.0.260311-beta; added vercel.json with bun install and build commands and .vercel/output outputDir.
Repo ignores
.gitignore
Added .output/ and .vercel/ entries to ignore list.
Repository docs/README
README.md, docs/chronicle.yaml
Updated README and docs config to reflect Vite + Nitro stack and set docs content path (content: .).

Sequence Diagram(s)

sequenceDiagram
    participant CLI as CLI (chronicle.js)
    participant Loader as loadCLIConfig
    participant Resolver as resolveContentDir
    participant FS as Filesystem
    CLI->>Loader: parse flags (--config, --content, --preset)
    Loader->>FS: locate resolved `chronicle.yaml` path
    Loader->>Resolver: pass config + resolved configPath + content flag
    Resolver->>FS: resolve final content directory (dirname(configPath) + config.content) or use content flag
    Resolver-->>Loader: return contentDir
    Loader-->>CLI: start dev/build with resolved paths
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • rohilsurana
  • rohanchkrabrty
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: update docs and add vercel.json' accurately reflects the main changes: documentation updates and the addition of vercel.json file.
Description check ✅ Passed The description is directly related to the changeset, detailing the Vite+Nitro migration documentation updates, CLI flag documentation, vercel.json addition, config resolution fix, and other related changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix_docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/components.mdx`:
- Around line 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.

In `@docs/frontmatter.mdx`:
- Around line 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.

In `@packages/chronicle/package.json`:
- 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.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 768bb301-5d79-4c40-9a38-6457ab6d1be9

📥 Commits

Reviewing files that changed from the base of the PR and between 8c3b2b6 and 190588d.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • .gitignore
  • docs/cli.mdx
  • docs/components.mdx
  • docs/configuration.mdx
  • docs/frontmatter.mdx
  • docs/index.mdx
  • docs/themes.mdx
  • package.json
  • packages/chronicle/package.json
  • vercel.json

@rsbh rsbh marked this pull request as draft April 6, 2026 04:07
rsbh and others added 7 commits April 7, 2026 11:48
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rsbh rsbh marked this pull request as ready for review April 7, 2026 06:31
@rsbh rsbh requested a review from rohanchkrabrty April 7, 2026 06:32
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/configuration.mdx (1)

265-268: Clarify default enforcement in schema definition.

The documented default of false for analytics.enabled is correct and enforced at runtime via the config merging logic in packages/chronicle/src/lib/config.ts:30 (analytics: { enabled: false, ...userConfig.analytics }). However, the schema definition at packages/chronicle/src/types/config.ts:66 uses z.boolean().optional() without an explicit default, making the schema inconsistent with the actual runtime behavior. Consider adding .default(false) to the schema to align it with the runtime enforcement and improve maintainability.

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

In `@docs/configuration.mdx` around lines 265 - 268, The analytics.enabled schema
is optional in the Zod type but runtime config merging enforces a default of
false; update the Zod definition for analytics.enabled in the config type (the
schema entry currently using z.boolean().optional()) to include a default by
changing it to z.boolean().default(false) (or remove .optional() and use
.default(false)) so the type/schema matches the runtime merge behavior (see the
config merge that sets analytics: { enabled: false, ...userConfig.analytics }).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/configuration.mdx`:
- Around line 265-268: The analytics.enabled schema is optional in the Zod type
but runtime config merging enforces a default of false; update the Zod
definition for analytics.enabled in the config type (the schema entry currently
using z.boolean().optional()) to include a default by changing it to
z.boolean().default(false) (or remove .optional() and use .default(false)) so
the type/schema matches the runtime merge behavior (see the config merge that
sets analytics: { enabled: false, ...userConfig.analytics }).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8d6fcf5c-f60c-45e3-8141-830cca5f8dfb

📥 Commits

Reviewing files that changed from the base of the PR and between 190588d and 1baf891.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (12)
  • .gitignore
  • docs/chronicle.yaml
  • docs/cli.mdx
  • docs/components.mdx
  • docs/configuration.mdx
  • docs/frontmatter.mdx
  • docs/index.mdx
  • docs/themes.mdx
  • package.json
  • packages/chronicle/package.json
  • packages/chronicle/src/cli/utils/config.ts
  • vercel.json
✅ Files skipped from review due to trivial changes (8)
  • docs/themes.mdx
  • .gitignore
  • vercel.json
  • docs/chronicle.yaml
  • packages/chronicle/package.json
  • docs/frontmatter.mdx
  • docs/components.mdx
  • docs/index.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json

@rsbh rsbh requested a review from rohilsurana April 7, 2026 06:38
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rsbh rsbh merged commit f14c7af into main Apr 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants