Skip to content

Publish all project documentation on smallrye.io, from the projects' repositories - #136

Open
phillip-kruger wants to merge 14 commits into
smallrye:developfrom
phillip-kruger:docs-hub
Open

phillip-kruger wants to merge 14 commits into
smallrye:developfrom
phillip-kruger:docs-hub

Conversation

@phillip-kruger

@phillip-kruger phillip-kruger commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Every SmallRye project's documentation is now published on this site at /docs/<project>/<version>/, from the project's own repository, as AsciiDoc laid out like the Quarkus guides. Antora leaves the build, and the per-project MkDocs/mike sites are replaced.

Project Versions Today's source
GraphQL latest (3.0.0.Beta8), main MkDocs
Config latest (4.0.0), main MkDocs
Fault Tolerance latest (7.0.0), 6, 5, main Antora
Health, JWT latest, main Antora
Metrics (archived) 3, 2 Antora
Reactive Messaging latest (5.0.0-RC1), 4, main MkDocs
Mutiny, Mutiny Zero, Stork latest, main MkDocs
Mutiny Vert.x bindings latest (4.0.2), 3, main MkDocs
Jandex latest (3.6.0), main Antora (own site)

Each project gets a PR moving its sources to AsciiDoc (smallrye/smallrye-graphql#2732 first). The site does not wait for those PRs: a release whose docs are still MkDocs or Antora is converted on the fly, so all current releases are published as soon as this is merged.

How it works

  • Registry. data/docs.yml lists every project with docs: repository, docs path, the versions followed, and the addresses published before. It also drives the /docs/ hub.
  • Sync. tools/docs/sync.py copies a project's docs from a branch, tag or local checkout into content/docs/<project>/<version>/, and records versions and navigation in data/docversions.yml. It also:
    • copies only the example sources pages include;
    • renders diagram blocks to SVG through Kroki;
    • takes build-generated files from the released jars (Reactive Messaging's connector tables).
  • Converters. tools/docs/mkdocs2adoc.py and tools/docs/antora2adoc.py do the one-off conversion of a project, and the on-the-fly one. The MkDocs converter covers the docissimo macros (insert, javadoc, image, attributes), admonitions, tabs, PlantUML and nested pages.
  • Workflows
    • Sync project documentation: nightly (main branches, new release tags) and on demand. It commits to develop.
    • Check project documentation: reusable. Project PRs render their docs with this site and fail on a broken include or a page that does not render.
    • Build: Antora and its Kroki services are gone. A step writes redirect pages for the 1,524 old Antora addresses (/docs/<project>/<release>/<page>.html) to the same page in the version replacing them.
  • Layout.
    • Sidebar, version picker (pre-move versions as "Older versions…"), on-this-page list.
    • Tabs, and "main"/"archived" notices.
    • Old #_snake_case anchors are mapped to the new Quarkus-style ids.
  • Blog. Posts link to the new addresses. tools/docs/rewrite-links.py checked each page and anchor against the generated site, including sections renamed in later releases.

Security

The PR check renders untrusted pull-request content, so:

  • sync and converters never follow symbolic links;
  • every read stays inside the checkout, and every write inside the target;
  • ids, refs and nav entries are validated (nav links must be http(s));
  • Asciidoctor's SAFE-mode jail is the site root.

Checked locally

  • 792 docs pages render with no errors and no Asciidoctor warnings, apart from Reactive Messaging's own issues:
    • its RabbitMQ pages include examples that don't exist in its repository;
    • one example lacks a tag end marker;
    • 5.0.0-RC1 links to a page it doesn't have.
  • 52,017 internal links and images checked: 2 broken, both that Reactive Messaging link.
  • All old addresses used by blog posts and the Quarkus guides lead to an existing page.

After merge

  • Repo settings: the CI GitHub App (CI_APP_ID/CI_APP_PRIVATE_KEY) is reused by the sync workflow.
  • Project PRs: merge them one by one; the nightly sync picks up each AsciiDoc main.
  • Cutover: on each project's gh-pages, the moving mike aliases (latest, Latest, Main) and root pages become redirects to /docs/<project>/latest/. Released versions stay as the archive. Jandex's Antora site gets the same treatment.

Projects keep their documentation in their own repository, as AsciiDoc laid out like the
Quarkus guides, and this site pulls it in and publishes it at /docs/<project>/<version>/.

- data/docs.yml lists every project with documentation; the /docs/ hub is generated from it
  and replaces the Antora start page.
- tools/docs/sync.py copies a project's docs from a branch, tag or local checkout into
  content/docs/<project>/<version>/, with only the example files the pages include, and
  records versions and navigation in data/docversions.yml. A release whose docs are still
  MkDocs is converted on the fly by tools/docs/mkdocs2adoc.py, also the one-off converter.
- The "Sync project documentation" workflow runs it nightly (main and the newest release tag)
  and commits to develop; "Check project documentation" is a reusable workflow projects call
  from pull requests to render their docs with this site.
- Docs pages get a layout with the project's sidebar, a version picker (with the pre-move
  versions as "Older versions"), an on-this-page list, tabs, and a fix-up for #_old_style ids.
- SmallRye GraphQL is the first project: 3.0.0.Beta8 as latest, and main.
- Antora output is now merged into the Roq docs directory instead of replacing it, and its
  playbook includes the Fault Tolerance 7.x tags, so 7.0.0's documentation is published.
- Blog posts no longer link to SmallRye Config pages that no longer exist.
… and bad ids

The docs check renders contributors' pull requests, so their docs are untrusted:
- symbolic links in a docs directory are skipped, and an included example must resolve
  inside the examples directory;
- version ids, refs and nav page names are checked before they become paths, and nav links
  must be http(s) (the sidebar template checks again);
- Asciidoctor's SAFE-mode jail is now the site root instead of each page's directory, so a
  page in a subdirectory can include its version's _attributes.adoc and examples while
  nothing outside the site can be included.

Also: pages in subdirectories are highlighted in the sidebar and get the right edit link,
and synced pages get an absolute imagesdir.
examples-dir comes from the project's _attributes.adoc, so it is now checked to stay inside
the checkout too, not only the includes below it; an included example is written to the path
it resolves to, never to its raw include path; and a symbolic link resolving outside the docs
directory is skipped.

The synced examples-dir is {version-root}_examples, with version-root empty by default, so a
page in a subdirectory (setting :version-root: ../) finds its version's examples.
… to the site

The four projects built with Antora are now published like GraphQL, from their repositories,
and Antora leaves the build (with its playbook and the Kroki services it needed).

- tools/docs/antora2adoc.py converts an Antora component to the Quarkus-style layout: pages
  keep their paths (so their addresses), partials and examples move under _partials/ and
  _examples/, nav.adoc becomes _nav.yml, antora.yml attributes become _attributes.adoc, and
  pages in subdirectories set :version-root: so shared paths resolve from any depth. The sync
  uses it for releases whose docs are still Antora.
- Fault Tolerance: latest (7.0.0), main, and the 6 and 5 release lines; Health and JWT: latest
  and main; Metrics, archived: its 3.0 and 2.4 lines, with an "archived" notice.
- Version ids carry no dots (Roq turns them into hyphens in addresses); the version picker and
  the hub show the release number instead.
- Diagram blocks are rendered to SVG once, during the sync, by a Kroki server; the docs
  workflows run one.
- Every address Antora published (/docs/<project>/<release>/<page>.html, 1,524 of them) gets a
  redirect page at build time (tools/docs/redirects.py) to the same page in the version that
  replaces it, keeping the #fragment; docs pages map Antora's #_generated_ids to the new ids.
- Blog posts link to the new addresses (tools/docs/rewrite-links.py, which checks each page and
  anchor against the generated site), including sections renamed in later releases.
…Messaging, Stork, ...)

Every SmallRye project with documentation is now on the site: Config, Mutiny, Mutiny Zero,
Mutiny Vert.x bindings, Reactive Messaging, Stork and Jandex join GraphQL and the former
Antora projects. Until their repositories carry AsciiDoc, each release is converted on the fly.

The MkDocs converter now covers what these projects use:
- docissimo macros: insert() becomes an include with tags (the <tag> comment markers of the
  examples become tag::/end:: markers, in place or on the synced copies), javadoc() a
  javadoc.io link, image() a titled image; attributes.yaml values become attributes, Maven
  ${...} placeholders resolved from the poms;
- pages in subdirectories (version-root), links relative to the page, images relative to the
  version, Markdown files other pages insert (partials), code fences with pymdownx options
  (title= becomes the block title), attributes inside listings, "!!!note" without a space
  and with an unindented body, no TeX math in "$Key ... $Value";
- build_plantuml diagrams: the .puml sources (includes inlined, light theme) are rendered by
  the sync like other diagram blocks.

The sync also:
- takes generated files from the released jars on Maven Central (Reactive Messaging's
  connector attribute tables, META-INF/connector/*.md), converted to AsciiDoc;
- drops navigation entries without a page, and points xrefs to index.adoc at the directory.

Checked: no rendering errors or Asciidoctor warnings except Reactive Messaging's own (its
RabbitMQ pages include examples that do not exist in its repository, one example lacks an
end marker, and 5.0.0-RC1 links to a page it does not have: 2 broken links out of 52,017).
@phillip-kruger phillip-kruger changed the title Publish project documentation from the projects' repositories Publish all project documentation on smallrye.io, from the projects' repositories Oct 15, 2026
For the cutover of each project: in a checkout of its gh-pages branch, the moving mike aliases
(latest, Latest, Main, ...; symlinks are replaced by directories) and the root page become
redirect pages to the same page under /docs/<project>/latest/, or to its start page when the
page no longer exists. Released versions stay as they are: the site links them as older
versions.
Attributes defined from {project-version} (such as Config's version) resolved before the sync's
own value was set; it now comes first. main gets the newest release, the version readers put in
their builds, and javadoc links use the same. Table cells keep their <br> line breaks.
From the project PRs (Config, Mutiny, Stork, Health, JWT, Mutiny Zero, Vert.x bindings):
- MkDocs: --8<-- snippets outside code blocks (Stork's attribute tables); #only-light/
  #only-dark image pairs keep the light one; Material icon shortcodes and the tags placeholder
  are dropped and page tags become :topics:; links to a heading by its text (#Some Heading)
  point to its id; ./page nav entries keep their page; the aggregated apidocs nav entry links to
  javadoc.io; snippet prefixes can be regular expressions.
- Antora: an anchor right above the title is dropped, <<id>> to another page becomes an xref,
  and the nav's "Index" is "Overview".
- Generated files: Stork's attribute tables come from its jars (META-INF/stork-docs/, Markdown in
  .txt); Mutiny Zero's examples resolve from the repository root.
- The reusable docs check runs read-only: it renders pull-request content.
@phillip-kruger

phillip-kruger commented Oct 15, 2026 •

Copy link
Copy Markdown
Member Author

Screenshots of each project's documentation before (its MkDocs or Antora site today) and after (the project's AsciiDoc from its PR, rendered by this branch locally), updated for the header and sidebar changes. On smallrye.io the sidebar starts closed (the ☰ button opens it, and it stays open on the next pages for that reader); its groups are folded except the one holding the current page. The project and version picker sit in the header next to the logo, so a start page has no separate title. Each project PR has more pages, including one with the sidebar open.

BeforeAfter
jandex · smallrye/jandex#733 · old page
jandex, beforejandex, after
smallrye-config · smallrye/smallrye-config#1603 · old page
smallrye-config, beforesmallrye-config, after
smallrye-fault-tolerance · smallrye/smallrye-fault-tolerance#1351 · old page
smallrye-fault-tolerance, beforesmallrye-fault-tolerance, after
smallrye-graphql · smallrye/smallrye-graphql#2732 · old page
smallrye-graphql, beforesmallrye-graphql, after
smallrye-health · smallrye/smallrye-health#713 · old page
smallrye-health, beforesmallrye-health, after
smallrye-jwt · smallrye/smallrye-jwt#935 · old page
smallrye-jwt, beforesmallrye-jwt, after
smallrye-mutiny · smallrye/smallrye-mutiny#2220 · old page
smallrye-mutiny, beforesmallrye-mutiny, after
smallrye-mutiny-vertx-bindings · smallrye/smallrye-mutiny-vertx-bindings#1475 · old page
smallrye-mutiny-vertx-bindings, beforesmallrye-mutiny-vertx-bindings, after
smallrye-mutiny-zero · smallrye/smallrye-mutiny-zero#376 · old page
smallrye-mutiny-zero, beforesmallrye-mutiny-zero, after
smallrye-reactive-messaging · smallrye/smallrye-reactive-messaging#3577 · old page
smallrye-reactive-messaging, beforesmallrye-reactive-messaging, after
smallrye-stork · smallrye/smallrye-stork#1385 · old page
smallrye-stork, beforesmallrye-stork, after
Sidebar open (smallrye-reactive-messaging, nested groups)
sidebar open

@Ladicek

Ladicek commented Oct 15, 2026

Copy link
Copy Markdown
Member

Hey @phillip-kruger, this looks amazing! One question: are we supposed to merge your PRs in the individual projects before this one is merged, or after? Or it doesn't matter?

@Ladicek

Ladicek commented Oct 15, 2026

Copy link
Copy Markdown
Member

Oh one more thing: the way we preview individual project docs locally is not good. I mean, it's probably the best we can do at the moment, and I usually don't mind because IntelliJ's built-in Asciidoc renderer is good enough for most cases, but when it's not... Well, I guess I'll get used to it. At least it's documented :-)

@phillip-kruger

Copy link
Copy Markdown
Member Author

Thanks @Ladicek! Best is this one first, then the project PRs in any order.

  • Each project PR adds a "Documentation" check that calls a workflow from this PR, so that check fails until this one is merged.
  • The current site still builds the Antora docs, and for JWT it reads doc/ on main. Move the documentation from Antora to AsciiDoc pages published on smallrye.io smallrye-jwt#935 is merged already, so the next build of the current site would fail on JWT until this PR (which drops Antora) is in. Fault Tolerance and Health are fine either way, as the current site reads their tags and the 3.0.x branch.
  • Nothing waits for the project PRs: once this is merged, smallrye.io converts every project's current release on the fly, and the nightly sync picks up each project's own AsciiDoc on main the night after its PR is merged.

@Ladicek

Ladicek commented Oct 15, 2026

Copy link
Copy Markdown
Member

OK, thanks! I'll review the PRs but wait with merging until this is done.

@smallrye smallrye deleted a comment from phillipkruger Oct 15, 2026
@phillip-kruger

Copy link
Copy Markdown
Member Author

@Ladicek I'll add something that make local preview easier.

This branch has not been deployed

No deployments
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