Redouble AI Nucleo documentation
Part 14 · Appendix

The site generator

ai.redouble.docs · nucleo-docs

This module turns the markdown files of the repository into the documentation site you are reading. The pages are the PACKAGE.md beside each package and a few other documents; the order they are read in, and the title each carries, come from one file, nucleo-docs/CONTENTS.md. The generator also proves the code shown on every page is the code that compiles. This page is for people who write or change documentation pages: it states the rules a page must follow for the site to build.

Where the site is built

The site is built in two places, from the same sources:

The whole pipeline is Maven plus a JDK, with no shell and no external tools, so it runs the same on any contributor's machine.

Where the site is published

The published documentation lives in a second repository, the documentation repository. It holds every published version side by side, already generated, one directory per version under site/nucleo, and the documentation host serves its site directory as it stands. A version is published by a person, on purpose, from a checkout of the sources at that version; no build publishes on its own.

mvn site-deploy -Ddocs.repo=<checkout of the documentation repository> from the reactor root builds the full site as mvn site does and then runs PublishDocs, which puts the site into that checkout under the reactor's version. PublishDocsTest holds what follows.

The development line after a release corrects that release's documentation too. Adding -Ddocs.version=0.1 generates the site of the tree as it stands with 0.1 on every page and in the javadoc's title, and publishes it as 0.1, replacing what 0.1 showed.

What is here

TypeRole
GenerateDocsThe main. Reads the contents, builds the class index, checks the samples, renders markdown through flexmark, wraps each page in the shared frame, writes the llms.txt pair and the search index, verifies the result.
SearchIndexWhat the search box searches: one entry per page opening, per section and, with the javadoc tree, per public class, written as search-index.js.
ContentsThe reading order, parsed from nucleo-docs/CONTENTS.md: the site's title and introduction, the front matter, and the parts with their introductions and pages.
SamplesChecks every checked sample of a page against the source region it names.
LinkRewriterResolves inter-doc .md links against the page manifest, points a link to any other file of the reactor at the copy the site ships, and turns backticked class names into javadoc links.
NavGeneratorEmits the sidebar shared by every page from the contents, the version badge at its top.
PublishDocsThe main of publication. Puts the generated site into a checkout of the documentation repository as one version, and rewrites the list of versions and the routing file.

The rules the generator holds

GenerateDocsTest holds this section.

The reading order

Pages

Code shown on a page

The version

The license

What a coding agent reads

The look

^