feat(docs): MDX documentation site with Beloch as a live renderer #18

Open
toph wants to merge 28 commits from feat/docs-site into main
Owner

Adds an Astro + Starlight docs site under site/ that embeds Beloch as a build-time renderer: .bel examples become crease-pattern and folded-state diagrams inline via a single render boundary (beloch fold piped through tools/fold2svg.mjs).

  • <Beloch src=… view=crease|folded|both /> (or inline source). The renderer seam is isolated in site/src/lib/beloch-render.ts, so a future js_of_ocaml live path drops in behind the same component API.
  • Guide section (getting started, installation, first fold) plus the full language spec migrated to MDX with living diagrams. spec/SPECIFICATION.md is reduced to a pointer stub — the site is now canonical.
  • Build fails loudly if any example fails to evaluate. 9 boundary tests, including negative loud-failure cases.

Requires the Beloch binary built first (dune build / nix build, or set BELOCH_BIN). The Oru-style design/theme is a follow-up.

Adds an Astro + Starlight docs site under `site/` that embeds Beloch as a build-time renderer: `.bel` examples become crease-pattern and folded-state diagrams inline via a single render boundary (`beloch fold` piped through `tools/fold2svg.mjs`). - `<Beloch src=… view=crease|folded|both />` (or inline source). The renderer seam is isolated in `site/src/lib/beloch-render.ts`, so a future js_of_ocaml live path drops in behind the same component API. - Guide section (getting started, installation, first fold) plus the full language spec migrated to MDX with living diagrams. `spec/SPECIFICATION.md` is reduced to a pointer stub — the site is now canonical. - Build fails loudly if any example fails to evaluate. 9 boundary tests, including negative loud-failure cases. Requires the Beloch binary built first (`dune build` / `nix build`, or set `BELOCH_BIN`). The Oru-style design/theme is a follow-up.
toph added 12 commits 2026-06-30 11:25:08 +00:00
Adds Beloch.astro component that calls renderBeloch at build time and
inlines SVGs. Fixes resolveRepoRoot to use BELOCH_REPO_ROOT env var
(set in astro.config.mjs) since import.meta.url is unreliable in Astro
prerender bundles.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Four pages under guide/: installation, getting-started, first-fold, and
axioms-tour (stub). Also removes the stray Starlight template guides/example.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two negative tests guard the render boundary's loud-failure contract:
syntax errors and semantic (runtime) errors both throw with the caller's
label. Build verified: all 9 tests pass, nav targets exist.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Builds beloch (nix), renders the site, ships site/dist to the
beloch-docs Pages project. Mirrors the blog.toph.so deploy setup.
toph added 10 commits 2026-06-30 12:12:37 +00:00
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Navy code panel with mac dots + sigil syntax highlighting; responsive
2-col grid with Faltbild/Gefaltet labels and #E2E3D2 divider.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
German Sprachreferenz with inline sigil chips, fold-type legend row,
syntax tables (Papier, Bezeichner, Konstruktoren, Faltbefehle, Rendern),
and Huzita–Justin axiom table. Axioms 6 & 7 marked (geplant).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This pull request has changes conflicting with the target branch.
  • spec/SPECIFICATION.md
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/docs-site:feat/docs-site
git switch feat/docs-site

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feat/docs-site
git switch feat/docs-site
git rebase main
git switch main
git merge --ff-only feat/docs-site
git switch feat/docs-site
git rebase main
git switch main
git merge --no-ff feat/docs-site
git switch main
git merge --squash feat/docs-site
git switch main
git merge --ff-only feat/docs-site
git switch main
git merge feat/docs-site
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
toph/beloch!18
No description provided.