docs(book): a book for people, and the site built from it #585
No reviewers
Labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Blocks
#587 book: Guide chapters (first project, modelling data, collections, files and formats, testing, native programs, design choices)
torbscript/language
#588 book: Guide, coming from another language
torbscript/language
#589 book: Reference, part 1 (syntax, built-in types, strings, functions, types, control flow)
torbscript/language
#590 book: Reference, part 2 (errors, traits, generics, collections, modules, concurrency, encoding)
torbscript/language
#591 book: Std pages, core and text
torbscript/language
#593 book: Std pages, system and I/O
torbscript/language
#592 book: Std pages, data formats
torbscript/language
#594 book: Std pages, network and security
torbscript/language
#598 book: rewrite the course (start/)
torbscript/language
#599 book: retire the human pages of docs/
torbscript/language
#595 book: Std pages, concurrency and the specialised modules
torbscript/language
#597 book: site pages (install, playground, agents, benchmarks)
torbscript/language
#596 book: Tools section
torbscript/language
Reference
torbscript/language!585
Loading…
Reference in a new issue
No description provided.
Delete branch "docs/582-book"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The documentation people read at torb.dev was rendered from the same
docs/tree that feeds the Agent Skills. That tree is built for completeness and fixed sections an agent can find, and it shows: 330k words, examples that never say what they print, design history and issue numbers on user pages,## Relatedchains at the bottom of 249 pages. Torben's verdict in #582 was blunt, and the audit there backs it up.This PR splits the two.
docs/stays the source of the skills and the contributor material. A new tree,book/, is written for people and is the only thing the site publishes.What is in it
book/CONCEPT.md,book/RESEARCH.md): who the book is for, six sections, how a page is written, what CI checks, and where every old page goes. Neither file is published.book/site/home.md), the overview (book/index.md), "What makes TorbScript different" (book/why.md), the full Tour (nine pages), two Guide pages (handling-errors,your-own-constructs), two Reference pages (bindings,cases-and-patterns) and two Std pages (json,fs), plus the section indexes.start/), its German translation and the website pages (site/) moved fromdocs/intobook/. The pages left indocs/that linked to them now link to the site.torb docs site book,Dockerfile.siteandimages.ymlreadbook/. The header shows Tour, Guide, Reference, Std, then the playground and the registry. No page ofdocs/is published any more.The rest of the book comes in one PR per section; the slice issues are listed on #582. Old pages in
docs/are deleted only when the section that replaces them lands, because the skills are built from them.How the gates work
torb docs checktreats a tree as a book when its root index has the kindbook. On top of the rules every tree has, a book gets these, all incompiler/src/documentation/book.trbandsnippets.trb, with tests incompiler/tests/documentation.test.trb:trb runblock is built and run, and what it prints must equal theoutputblock under it, line by line.outputblock of atrb errorblock must be exactly whattorb check main.trbprints for it, fromerror:on, so the reader sees the real message with its source line.trb runortrb errorblock without anoutputblock directly under it is an error, and so is a strayoutputblock. Fragments and skips are not allowed in a book.tools/gates.shrunsdocs check book,docs index --check bookanddocs site book --checkin the docs lane, so every pull request checks the whole book.Refs #582
aea8fd94b586797a79e0CI was red on
361e339for one real cause, not a flake: intier A (linux-x64)four gates failed (the 32 min is the whole gate run, no timeout).format --checkwanted six files reformatted (compiler/src/documentation/{book,markdown,site-html,site-layout,snippets}.trb,compiler/tests/site.test.trb).docs index --checkanddocs check docs:docs/tooling/index.mdstill carried the oldtorb docs sitedescription.docs skill --check: four skill pages were stale (the same description, plus the course/install links the site now carries). The book gates (docs check book,docs index --check book,docs site --check) and the native half were green. Fixed inc7e10639(torb format) and86797a79(torb docs index docs,torb docs skill docs skills), run with the torb binary CI built for361e339; no content changed. Waiting for CI on86797a79, then re-requesting review.Checklist on
86797a7:compiler/tests/documentation.test.trbandsite.test.trbcover the new book rules and the book-based site. CI is green for this head (tier A and B, bootstrap, gates incl.docs check book,docs index --check book,docs site book --check, pdisc).book.trbrules (history words, issue numbers, link scope, banned headings, list limits) read correctly.Dockerfile.sitefalls back todocsfor older sources, so old releases still build.book/CONCEPT.md("Deleted with their originals") and stay in git history. The skills are not built from them (docs skill --checkis green).docs/tooling/torb-docs-site.md, the tooling index and the skill pages are regenerated. The pages left indocs/now point at the site.book/.docs site book --checkverifies the build and its internal links.Non-blocking:
guide/andsite/translations are deleted indocs/. It is only inbook/CONCEPT.md. A line in the body or the merge note would help.