Skip to content

Convert the FAQ from FML to Markdown - #418

Closed
slachiewicz wants to merge 2 commits into
masterfrom
faq-to-markdown
Closed

Convert the FAQ from FML to Markdown#418
slachiewicz wants to merge 2 commits into
masterfrom
faq-to-markdown

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

This PR is provisional and overlaps #413. #413 (fixes #404) proposes deleting src/site/fml/faq.fml and its site.xml entry outright. If the project prefers that, close this PR — no argument from me about the content being thin. This is offered as the alternative for the case where the project would rather keep the two URLs alive: deleting the page retires faq.html along with #What_is_a_Mojo and #Why_mvn_help.3Aactive-profiles_won.27t_show_the_active_profiles_under_Maven_2.1, which have been served for years. Whichever way it goes, one of the two PRs should be closed rather than both left open.

Part of an estate-wide move of the remaining FAQ pages from FML to Markdown.

Two commits, deliberately

  1. A pure rename, src/site/fml/faq.fml -> src/site/markdown/faq.md, no content change.
  2. The rewrite, written by hand.

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.

Why by hand

doxia-converter cannot target FML: 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.

Anchors are preserved, and that is the point

FML derives its anchor from the <faq id=…> attribute, and where that attribute is not a valid XML name DoxiaUtils.encodeId rewrites it at render time. Neither id here is a valid XML name. The second one is worth a look:

#Why_mvn_help.3Aactive-profiles_won.27t_show_the_active_profiles_under_Maven_2.1

: became .3A, ' became .27, and it ends at 2.1 with no .3F — the id never carried the question mark the question does. The <a name> written here reproduces that rendered form, not the raw attribute.

Verification

Built the site with mvn site before and after and compared the set of anchors the generated faq.html actually serves. Every anchor served before is still served after; <head> byte-identical, so title and metadata are unchanged. site.xml needs no edit — FML and Markdown both render to faq.html, so the menu entry keeps working.

What is lost

FML generates a [top] back-link after each answer. Those are dropped rather than hand-written. The question becomes an h3 heading instead of a definition term. Nothing else changes.

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)
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.

Neither <faq id=...> value is a valid XML name, so DoxiaUtils.encodeId
rewrites both at render time: 'What is a Mojo' survives as
#What_is_a_Mojo, and the second becomes
#Why_mvn_help.3Aactive-profiles_won.27t_show_the_active_profiles_under_Maven_2.1
- note that it ends at '2.1' with no '.3F', because the id carries no
question mark even though the question does. The <a name> elements
written here reproduce those rendered forms, not the raw attributes, so
the live deep links still resolve.

The first question needs no explicit <a name>: the h3 it becomes
already generates #What_is_a_Mojo from the same encodeId rule, so
writing one as well would emit the id twice and Doxia warns about it.
The second does need one, because the heading would generate a
trailing '.3F' the live anchor does not have.

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, and 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, so the menu entry
keeps working.

FML generates a [top] back-link after each answer; those are dropped
rather than hand-written. The question becomes an h3 heading instead of
a definition term. Nothing else on the page changes.

Generated-by: Claude Opus 5 (1M context)
@slachiewicz slachiewicz added the documentation Improvements or additions to documentation label Aug 9, 2026
@slachiewicz

Copy link
Copy Markdown
Member Author

Closing: the FAQ is being removed entirely in #413 (fixes #404), so converting it to Markdown is moot. Deferring to that.

@slachiewicz
slachiewicz deleted the faq-to-markdown branch August 10, 2026 00:24
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.

Remove src/site/fml/faq.fml

1 participant