Skip to content

feat(cli): add lectio dev and zero-config scaffolding - #25

Merged
losolio merged 1 commit into
mainfrom
feat/lectio-dev
Jul 25, 2026
Merged

feat(cli): add lectio dev and zero-config scaffolding#25
losolio merged 1 commit into
mainfrom
feat/lectio-dev

Conversation

@losolio

@losolio losolio commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

What

Adds lectio dev and zero-config scaffolding to the CLI.

  • lectio dev — materializes the site app and runs react-router dev: a
    local dev server with HMR on the app UI. Content is collected once at startup.
  • Zero-config — when no docs.config exists, both dev and build
    scaffold a starter docs.config.ts (**/*.md, .ts not .mjs) and run with
    it, so a fresh repo shows a demo immediately.

Verified

  • lectio build unchanged (regression: examples/quickstart still builds)
  • Zero-config dev in a fresh repo: scaffolds docs.config.ts, collects, serves
    at :5173, route-aware (/docs, /docs/guide → 200)

Notes

  • **/*.md mirrors the tree (docs/index.md/docs); no / home unless a
    root index.md exists. The scaffolded config is a starting point to edit.
  • Known edge: a root-level README.md gets a /. slug under **/*.md — left
    as-is for now.
  • Content is collected once per dev run; a --watch for markdown is a natural
    follow-up.

`lectio dev` materializes the site app and runs `react-router dev` (a local dev
server with HMR on the UI); content is collected once at startup. When no
docs.config exists, both dev and build scaffold a starter docs.config.ts
(`**/*.md`, .ts not .mjs) and run with it, so a fresh repo shows a demo
immediately.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 25, 2026 10:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the lectio CLI with a new dev subcommand and introduces “zero-config” behavior that scaffolds a starter docs config when none is present, enabling an immediate demo experience in a fresh repository.

Changes:

  • Add lectio dev, which materializes the site app and runs react-router dev for local development with HMR.
  • Implement zero-config scaffolding: when no docs.config.* exists, write a starter docs.config and proceed with collect/build/dev.
  • Update CLI help/docs/comments and add a changeset for a minor release.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
apps/site-builder/bin/lectio.mjs Adds dev command, zero-config scaffolding, and routes to react-router dev vs react-router build.
.changeset/lectio-dev.md Declares a minor release and documents the new dev + scaffolding behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@losolio
losolio merged commit e4ffa3f into main Jul 25, 2026
2 checks 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