Repository navigation
Publish all project documentation on smallrye.io, from the projects' repositories - #136
phillip-kruger wants to merge 1 commit into
Conversation
|
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; further down, a start page lists the documentation, from its navigation. Each project PR has more pages, including one with the sidebar open.
Dark theme: the same screenshots with the dark themeThe old Antora sites and the GraphQL, Vert.x bindings and Mutiny Zero MkDocs sites have no dark theme, so their "before" stays light; the other old MkDocs sites were switched to their own dark palette.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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? |
|
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 :-) |
|
Thanks @Ladicek! Best is this one first, then the project PRs in any order.
|
|
OK, thanks! I'll review the PRs but wait with merging until this is done. |
|
@Ladicek I'll add something that make local preview easier. |
|
@Ladicek about previewing locally: that should be much better now. In a project's checkout, To make that possible, the tools in this PR are now Java (one JBang program, |
|
Sounds much better, thanks! |
Each project's AsciiDoc documentation is pulled from its repository into content/docs/<project>/<version>/ and published at /docs/<project>/<version>/, replacing Antora and the per-project MkDocs/mike sites. - data/docs.yml: the projects, their docs paths, the versions followed (main, latest, older major lines) and their old addresses. - tools/docs/Docs.java (JBang): sync, local preview, MkDocs and Antora converters (releases still in those formats are converted on the fly), dark versions of diagrams and drawings, redirects for the old Antora addresses and the old gh-pages sites, and blog link rewriting. - Workflows: nightly and on-demand sync committing to develop, a reusable check for project PRs, and the build without Antora. - Layout: docs pages with sidebar, version picker, on-this-page list, tabs, start-page contents and dark-theme images; blog posts link to the new addresses. - content/docs/ and data/docversions.yml: the synced documentation of 39 versions of 12 projects.
cfd9016 to
be09664
Compare
























































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.The newest release of each older major line is published too, so the old MkDocs sites can go entirely (old addresses redirect, see Cutover).
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.
Reviewing: why 2,482 files
Almost all of the diff is documentation copied in from the projects, not code.
tools/docs/, templates, CSS/JS, workflows,data/docs.yml, README, blog linkscontent/docs/(39 versions of 12 projects) anddata/docversions.yml.adocpages;content/docs/anddata/docversions.ymlin the PR's file filter.maincommit or release tag moved, and commits todevelopas the CI GitHub App, which triggers the normal build and deploy;How it works
data/docs.ymllists every project with docs: repository, docs path, the versions followed, and the addresses published before. It also drives the/docs/hub.tools/docs/Docs.java: Java and JBang are all it needs. Each subcommand was checked byte for byte against the Python scripts it replaced, including the full nightly sync (28 versions of 13 projects).Docs.java synccopies a project's docs from a branch, tag or local checkout intocontent/docs/<project>/<version>/, and records versions and navigation indata/docversions.yml. It also:Docs.java mkdocs2adocandDocs.java antora2adocdo 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.develop./docs/<project>/<release>/<page>.html) to the same page in the version replacing them.#_snake_caseanchors are mapped to the new Quarkus-style ids.Docs.java dark-images, run by the sync): the project's ownx.dark.png, or the same hues with lightness inverted and white made transparent. Screenshots and photos keep a light background; rolesno-dark/dark-invertoverride.Docs.java rewrite-linkschecked each page and anchor against the generated site, including sections renamed in later releases.Preview a project's docs locally (once this is merged)
In the project's checkout:
Then open
http://localhost:8080/docs/<project>/main/, for example http://localhost:8080/docs/smallrye-fault-tolerance/main/.What it does:
docs-previewprofile (added by each project PR) runsjbang docs-preview@smallrye/smallrye.github.io, and installs JBang if needed.developonce a day, and publishes the project's docs as themainversion.jbang docs-preview@smallrye/smallrye.github.io --help):--port <port>for another port;--site ../smallrye.github.ioto preview against a local checkout of this site, for example to try layout changes.It only works once this PR is merged, because it runs the tools and the site from
develop.Security
The PR check renders untrusted pull-request content, so:
Checked locally
After merge
CI_APP_ID/CI_APP_PRIVATE_KEY) is reused by the sync workflow.main.gh-pages,Docs.java gh-pages-redirectsturns every page of every old version into a redirect to the same page of its major line here (e.g./smallrye-graphql/2.8.0/federation/→/docs/smallrye-graphql/2/federation/, or the version's start page if the page no longer exists). Tried on all seven branches: 12,739 redirect pages, none broken, 85% to the same page. Javadoc (apidocs/) stays as it is. Jandex's old site gets the same treatment.