Skip to content

Convert the remaining site documentation from APT to Markdown - #3422

Merged
slachiewicz merged 2 commits into
masterfrom
apt-to-markdown
Aug 10, 2026
Merged

slachiewicz merged 2 commits into
masterfrom
apt-to-markdown

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Aug 9, 2026 •

Copy link
Copy Markdown
Member

APT is a dead format; Doxia 2 keeps it only for backwards compatibility. These 35 pages were the last APT sources in this repository.

Two commits, deliberately kept apart:

  1. Rename the site documents ahead of converting them β€” pure git mv, no content change.
  2. Convert the site documents from APT to Markdown β€” the conversion.

Please merge or rebase, rather than squash. Git's rename detection is similarity-based, so squashing collapses the rename back into a delete plus an add and git log --follow stops at this PR. Review is easiest on the second commit alone.

What was converted

Module Pages
maven-surefire-plugin 27 (index, usage, api, developing, history + 22 under examples/)
maven-surefire-report-plugin 7 (index, usage + 5 under examples/)
surefire-api 1 (index)

How it was verified

The site was generated before and after the change and the rendered HTML compared page by page β€” 150 pages β€” on three axes: document title, author and date metadata plus visible text and every link target; the block structure (<pre> classes, headings, tables, lists, figures); and the heading anchors, so that every #Fragment cross-reference still resolves.

maven-failsafe-plugin is in that set on purpose: it renders maven-surefire-plugin's site sources from the site-source artifact, so every #if on ${project.artifactId} has to keep working for both plugins. Each conditional page was converted once per branch and the two results merged back together, so both renderings are reproduced exactly.

All 150 pages come out identical except for the two intended changes below, plus the project-info reports (dependencies, dependency-convergence) and the Surefire test report, which differ only because of how the two comparison builds were invoked.

Things the converter cannot get right on its own

  • Pages that still need Velocity keep the .vm suffix. In such a file ## opens a Velocity line comment and would silently swallow the heading, so level two headings use a setext underline and deeper levels are wrapped in #[[### ...]]#. The %{toc} on examples/system-properties still lists all 5 entries.
  • api.md, developing.md, examples/cwd.md and the report plugin's examples/linking-to-tests.md contain no Velocity at all, so they drop the .vm suffix.
  • References the page means to show rather than resolve are written ${esc.d}{...}. A backslash only unescapes when the name happens not to resolve in the document's context β€” ${project.build.outputDirectory} does resolve, and was being substituted with a real path.
  • Fenced blocks carry a language. The Markdown parser boxes a block only when the info string is non-empty, so a bare fence would quietly downgrade the boxed samples to plain <pre> β€” 163 boxed blocks before, 163 after. The one APT block that was deliberately unboxed, in examples/toolchains, keeps a bare fence.
  • APT figures became <figure>/<figcaption> so captions stay visible on the page instead of disappearing into an alt attribute.
  • A few bold runs and literal asterisks needed escaping to survive as text.

Intended changes

Both follow from a Markdown table needing a header row where the APT table had none:

  • surefire-api/index.md β€” the definitions table gains Term and Definition headings.
  • table-bordered is dropped from tables (history, examples/toolchains, surefire-api/index) β€” the Markdown sink does not emit that class. Not controllable from the source document.

Only master is touched; surefire-3.5.x is deliberately left alone.

Generated-by: Claude Opus 5

Doing the rename on its own keeps git log --follow working across the
conversion.  Please merge or rebase this branch rather than squashing it.

Generated-by: Claude Opus 5
@slachiewicz slachiewicz added documentation Improvements or additions to documentation master labels Aug 9, 2026
APT is a dead format; Doxia 2 keeps it only for backwards compatibility.
These 35 pages were the last APT sources in the repository.

Converted with doxia-converter, then verified by building the site before
and after and diffing the generated HTML, page by page, for the four
modules affected: maven-surefire-plugin, maven-surefire-report-plugin,
surefire-api and maven-failsafe-plugin.  Failsafe matters here because it
renders maven-surefire-plugin's site sources from the site-source
artifact, so every #if on ${project.artifactId} had to keep working for
both plugins; each conditional page was converted once per branch and the
two results merged back together.

Notes on the parts the converter cannot get right on its own:

* Pages that still need Velocity keep the .vm suffix.  In such a file
  '##' opens a Velocity line comment, so level two headings use a setext
  underline instead.
* api.md, developing.md, examples/cwd.md and the report plugin's
  examples/linking-to-tests.md contain no Velocity at all and drop the
  suffix.
* References the page means to show rather than resolve are written
  ${esc.d}{...}; a backslash only unescapes when the name happens not to
  resolve in the document's context.
* APT figures become <figure>/<figcaption> so the caption stays visible
  on the page rather than disappearing into an alt attribute.
* Fenced blocks carry a language.  The Markdown parser boxes a block only
  when the info string is non-empty, so a bare fence would quietly turn
  the 163 boxed samples into plain <pre>.  The one APT block that was
  deliberately unboxed, in examples/toolchains, keeps a bare fence.

Two intended changes, both because a Markdown table must have a header
row and the APT table in surefire-api/index.md had none: that table gains
Term and Definition headings, and tables lose the table-bordered class on
history, examples/toolchains and surefire-api/index.

Generated-by: Claude Opus 5
@slachiewicz
slachiewicz marked this pull request as ready for review August 10, 2026 00:06
@slachiewicz
slachiewicz merged commit 1362aea into master Aug 10, 2026
17 of 18 checks passed
@slachiewicz
slachiewicz deleted the apt-to-markdown branch August 10, 2026 00:06
@github-actions github-actions Bot added this to the 3.6.0-M2 milestone Aug 10, 2026
slachiewicz added a commit that referenced this pull request Aug 10, 2026
A Markdown pipe table renders as class="table table-striped"; the APT
tables these two pages came from rendered as
class="table table-bordered table-striped", so the conversion in #3422
quietly dropped the cell borders.

Doxia parses a raw HTML table back into the same table it built from
APT -- the class and the per-cell style survive verbatim and it still
applies the alternating row classes itself -- so writing these two out
as HTML restores the original rendering exactly.

Verified against the pre-conversion site: examples/toolchains now
matches the APT baseline on every axis compared, and the only remaining
difference on surefire-api/index is the Term and Definition header
cells, which were added deliberately in #3422 because a Markdown table
cannot express a headerless one.

history.md.vm keeps its Markdown table on purpose.  It carries 24 links
and 38 line breaks across nine rows and gains a row every release, so
readable source is worth more there than the border.

Generated-by: Claude Opus 5 (1M context)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant