Skip to content

Convert the FAQ from FML to Markdown - #280

Merged
slachiewicz merged 2 commits into
maven-plugin-testing-3.xfrom
faq-to-markdown
Aug 10, 2026
Merged

Convert the FAQ from FML to Markdown#280
slachiewicz merged 2 commits into
maven-plugin-testing-3.xfrom
faq-to-markdown

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

Converts this project's FAQ from FML to Markdown, completing the estate-wide move
off the Doxia FML format.

maven-plugin-testing-harness/src/site/fml/faq.fml becomes
maven-plugin-testing-harness/src/site/markdown/faq.md, in two commits:

  1. a pure git mv, no content change, so git log --follow keeps working;
  2. the hand-written rewrite.

Please merge or rebase rather than squash, so the rename commit survives.

Why this targets 3.x rather than master

This FAQ exists only on this branch. master was frozen and its FML deleted, so
the copy here is the only source for the published page — which is why the PR is based
on maven-plugin-testing-3.x.

Why by hand rather than with doxia-converter

FML is a FAQ-specific Doxia format (<faqs> / <part> / <faq id=…>) with no Markdown
counterpart, and doxia-converter cannot target it: the questions come out as
link-reference syntax rather than headings, the [top] back-links turn into links to a
nonexistent top page, and the contents links lose their # anchors.

Every published URL still resolves

Both anchors on this page are load-bearing, and neither could have been produced by
letting Doxia derive an id from the heading:

published anchor what a heading alone would give
What_is_a_Mojo_Testing_Harness What_is_a_Mojo_Testing_Harness.3F
What_kinds_of_unit_tests_are_supported What_kind_of_unit_tests_are_supported.3F

The ids omit the question mark, so there is no trailing .3F; and the second is
plural (kinds) while the question reads "What kind of unit tests are
supported?". Both are therefore written out explicitly, reproducing the rendered
anchor rather than the raw id= attribute.

Verified by generating the site before and after and comparing the set of anchors the
generated faq.html actually serves:

before: 4 anchors   after: 7 anchors   missing: none
What_is_a_Mojo_Testing_Harness
What_kinds_of_unit_tests_are_supported
bodyColumn
top

The <head> is byte-identical. site.xml needs no edit — both source paths render to
faq.html.

Two branch-specific details

Anchor form. Written as <a id>, not <a name>. maven-site-plugin 3.21.0 drops the
name attribute from inline HTML anchors while 3.22.0 keeps it. This branch resolves to
3.22.0 (via maven-parent:49), so name would have worked here — but id is the
primary path in Xhtml5BaseParser, is the correct HTML5 form, and keeps the page safe if
it is ever built with an older toolchain. The build emits no duplicate-anchor warning.

Metadata. The unfenced MultiMarkdown block, matching every other markdown page on this
branch, and carrying only the title — because the FML declared only a title. Adding
author/date like the sibling pages would have introduced meta elements the published
page does not currently have and broken the byte-identical <head>. The effective
doxia-module-markdown here is 2.1.0, which accepts either form, so this is a
consistency choice rather than a constraint; it was confirmed against the generated page,
where index.md's unfenced block parses into <head> correctly.

Accepted rendering losses

  • FML emits a [top] back-link after every answer; those are dropped rather than
    hand-written.
  • Each question renders as an h3 heading rather than a definition term.

The definition list inside the second answer is genuine, and is kept as real <dl> markup
rather than flattened into prose.

Generated-by: Claude Opus 5 (1M context)

Git records a rename plus a rewrite in one commit as a delete and an
add, which stops 'git log --follow'. Splitting the rename out keeps the
history. Please merge or rebase rather than squash.

Generated-by: Claude Opus 5 (1M context)
This FAQ exists only on this branch: master was frozen and its FML
deleted, so maven-plugin-testing-harness/src/site/fml/faq.fml here is
the only source for the published page.

doxia-converter cannot target FML usefully - the questions come out as
link-reference syntax rather than headings, the [top] back-links become
links to a nonexistent 'top' page, and the contents links lose their #
anchors. The page is written out by hand instead.

Explicit anchors keep the existing deep links working. FML routes every
<faq id> through DoxiaUtils.encodeId, and the rendered anchor is not the
question text: both entries here differ from what a heading alone would
produce. The published anchors have no trailing .3F because the ids omit
the question mark, and the second is What_kinds_of_unit_tests_are_supported
- plural - while the question reads "What kind of unit tests are
supported?". Neither could have been reproduced by relying on the id
Doxia derives from the heading, so both are written out explicitly.

They are written as <a id> rather than <a name>. maven-site-plugin
3.21.0 drops the name attribute from inline HTML anchors while 3.22.0
keeps it; this branch resolves to 3.22.0, so name would have worked here,
but id is the primary path in Xhtml5BaseParser, is the correct HTML5
form, and keeps the page safe if it is ever built with an older
toolchain.

The metadata is the unfenced MultiMarkdown block used by every other
markdown page on this branch, and carries only the title, because the
FML declared only a title. Adding author or date would have introduced
meta elements the published page does not currently have.

Verified by building the site before and after and comparing the set of
anchors the generated faq.html actually serves. All 4 anchors present
before are still present after (7 after, the extra 3 being the ids Doxia
derives from the new headings):

  What_is_a_Mojo_Testing_Harness
  What_kinds_of_unit_tests_are_supported
  bodyColumn
  top

The <head> is byte-identical, which also confirms the metadata was
parsed rather than rendered into the page. site.xml needs no edit - both
source paths render to faq.html.

FML generates a [top] back-link after each answer; those are dropped
rather than hand-written. The question renders as an h3 heading rather
than a definition term. Those are the only rendering losses; the
definition list inside the second answer is kept as real <dl> markup.

Generated-by: Claude Opus 5 (1M context)
@slachiewicz slachiewicz added documentation Improvements or additions to documentation 3.x labels Aug 10, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review August 10, 2026 01:20
@slachiewicz
slachiewicz merged commit fa173cf into maven-plugin-testing-3.x Aug 10, 2026
14 of 15 checks passed
@slachiewicz
slachiewicz deleted the faq-to-markdown branch August 10, 2026 01:20
@github-actions github-actions Bot added this to the 3.5.2 milestone Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant