build(just): docgen writes the pages of the docs site into starlight/, in their final form

`just docgen` takes no path now: it runs schemars-docgen from the tree (a member of the workspace) and
komorebic, writes the schema pages and the per-command pages into starlight/, and runs the script of the
site that makes the komorebic page of the platform from them, so nothing is left for `npm run build` to
generate. Only Windows and macOS have pages in the site.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
LGUG2ZandClaude Sonnet 5.5 committed 2026-11-10 14:03:32 -08:00
1 parent 01f16a2335
commit 47cde0d279
1 file changed
+22 -5
+22 -5
View File
@@ -210,12 +210,29 @@ docgen-local:
docgen-local:
{{ cargo_stable }} run --package komorebic --locked -- docgen --output docs/{{ platform }}/cli
# the reference pages of the Windows or macOS site, from the schemas and the command line
docgen starlight:
# the docs site, in this repository
starlight := "starlight"
# schemars-docgen, built from this tree: the tool is a member of the workspace (crates/schemars-docgen)
schemars_docgen := cargo_stable + " run --package schemars-docgen --locked --"
# What it writes: the configuration and bar schema pages (schemars-docgen, from schemas/<platform>/), the page of every
# komorebic command (komorebic docgen) and the one komorebic page of the platform that the site makes from them.
# the reference pages of the docs site for this platform, in their final form, into starlight/
[macos]
[windows]
docgen:
rm {{ starlight }}/src/data/cli/{{ platform }}/*.md
{{ cargo_stable }} run --package komorebic -- docgen --output {{ starlight }}/src/data/cli/{{ platform }}
schemars-docgen ./schemas/{{ platform }}/schema.json --output {{ starlight }}/src/content/docs/reference/komorebi-{{ platform }}.mdx --title "komorebi.json ({{ platform }})" --description "komorebi configuration schema reference for {{ platform }}"
schemars-docgen ./schemas/{{ platform }}/schema.bar.json --output {{ starlight }}/src/content/docs/reference/bar-{{ platform }}.mdx --title "komorebi.bar.json ({{ platform }})" --description "komorebi-bar configuration schema reference for {{ platform }}"
{{ cargo_stable }} run --package komorebic --locked -- docgen --output {{ starlight }}/src/data/cli/{{ platform }}
{{ schemars_docgen }} schemas/{{ platform }}/schema.json --output {{ starlight }}/src/content/docs/reference/komorebi-{{ platform }}.mdx --title "komorebi.json ({{ platform }})" --description "komorebi configuration schema reference for {{ platform }}"
{{ schemars_docgen }} schemas/{{ platform }}/schema.bar.json --output {{ starlight }}/src/content/docs/reference/bar-{{ platform }}.mdx --title "komorebi.bar.json ({{ platform }})" --description "komorebi-bar configuration schema reference for {{ platform }}"
node {{ starlight }}/scripts/generate-cli-reference.cjs
# the site has the pages of Windows and macOS only; the Linux documents are docs/linux
[linux]
docgen:
@echo "the docs site has no pages for Linux: run this on Windows or macOS" && exit 1
# schemars-nixgen, built from this tree: the tool is a member of the workspace (crates/schemars-nixgen)
nixgen := cargo_stable + " run --package schemars-nixgen --locked --"