Skip to content

Convert the FAQ from FML to Markdown - #689

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

Convert the FAQ from FML to Markdown#689
slachiewicz merged 2 commits into
masterfrom
faq-to-markdown

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Aug 10, 2026

Copy link
Copy Markdown
Member

Part of an estate-wide move of the remaining FAQ pages from FML to Markdown. FML is a
FAQ-specific Doxia format with no Markdown counterpart and doxia-converter cannot target
it, so the page is hand-written rather than converted.

Two commits, deliberately

  1. A pure rename, src/site/fml/faq.fmlsrc/site/markdown/faq.md, no content change.
  2. The rewrite.

Git records a rename plus a rewrite in a single commit as a delete and an add, which stops
git log --follow. Splitting them keeps the history.
Please merge or rebase rather than squash, since squashing collapses the rename again.

Anchors are preserved, and that is the point

This page has been on maven.apache.org for years and is linked from outside, so no URL may
change. FML derives its anchor from the <faq id=…> attribute; Markdown headings would
instead get an anchor derived from the question text, which is a different string. So the
<a id> written here reproduces the anchor the live site serves today.

Verification

Built the site before and after and compared the set of anchors the generated faq.html
actually serves:

anchors served
before question, skip, deploy_deploy, top, bodyColumn
after the same five, plus four heading-derived ids

Every anchor present before is still present after — the set only grows. The <head> is
byte-identical, so the title and metadata are unchanged. site.xml needs no edit:
src/site/fml/faq.fml and src/site/markdown/faq.md both render to faq.html.

Anchors are written as <a id>, not <a name>

maven-site-plugin 3.21.0 strips the name= attribute from an inline HTML anchor; 3.22.0
keeps it
— on 3.21.0 every anchor is lost silently on a green build. This repo is on a
parent that pulls 3.22.0 so either form works today, but <a id> survives both, and it is
the correct form anyway: Xhtml5BaseParser reads Attribute.ID first and falls back to
NAME only if it is absent, and name= on <a> is obsolete in HTML5. Anchors stay on
their own line, since folding one into the heading text suppresses the section's own id.

Straight quotes are written as &quot; / &apos;

flexmark's smart-punctuation extension rewrites a straight " in Markdown prose as a
typographic quote, whereas FML — being XML — rendered it straight. Left alone that silently
changes the visible text, and the anchor check cannot see it. Escaping restores the
original rendering; this is the convention maven-site-plugin's own converted pages use.

Additional checks

  • target/site deleted before every build and the page confirmed regenerated, so no result
    here comes from a stale page.
  • Visible text of the two pages compared word by word: identical apart from the dropped
    [top] links.
  • Site log reports no used more than once anchor warning (this page has no anchor that
    collides with a heading-derived id, so every explicit anchor is load-bearing).

What is lost

FML generates a [top] back-link after each answer; those are dropped rather than
hand-written. The question now renders as an h3 heading instead of a definition term.
Those are the only rendering differences.

Drafted with Claude — please verify

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)
@slachiewicz slachiewicz added the documentation Improvements or additions to documentation label Aug 10, 2026
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. The <a id>
emitted here reproduces the anchor the rendered page serves today, not
the raw <faq id> attribute, which FML rewrites whenever it is not a
valid XML name.

Anchors are written as <a id>, not <a name>: maven-site-plugin
3.21.0 strips name= from an inline HTML anchor, which loses every anchor
on an otherwise green build, and name= on <a> is obsolete in HTML5.
Xhtml5BaseParser reads Attribute.ID first and only falls back to NAME,
so id= is the primary path. Each anchor sits on its own line, since
folding one into the heading text suppresses the section's own id.

Straight quotes in prose are written as &quot; and &apos;. flexmark's
smart-punctuation extension would otherwise turn them into typographic
quotes, silently changing the visible text - FML, being XML, rendered
them straight. This is the convention maven-site-plugin's own converted
pages already use.

Verified by building the site before and after and comparing the set of
anchors the generated faq.html actually serves. Every anchor present
before is still present after:

  before: question, skip, deploy_deploy, top, bodyColumn
  after:  the same five, plus four heading-derived ids

The check also compares the visible text of the two pages word by word;
it is identical apart from the dropped [top] links. The site log reports
no "used more than once" anchor warning.

The <head> is byte-identical, so the title and metadata are unchanged.
site.xml needs no edit - src/site/fml/faq.fml and
src/site/markdown/faq.md both render to faq.html.

FML generates a [top] back-link after each answer; those are dropped
rather than hand-written. The question now renders as an h3 heading
instead of a definition term. Those are the only rendering losses.

Generated-by: Claude Opus 5 (1M context)
@slachiewicz
slachiewicz marked this pull request as ready for review August 10, 2026 01:14
@slachiewicz
slachiewicz merged commit 2dd94b4 into master Aug 10, 2026
11 checks passed
@slachiewicz
slachiewicz deleted the faq-to-markdown branch August 10, 2026 01:14
@github-actions github-actions Bot added this to the 4.0.0-beta-3 milestone Aug 10, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant