Skip to content

Port the site documentation from APT to Markdown - #12682

Open
slachiewicz wants to merge 3 commits into
apache:masterfrom
slachiewicz:site-apt-to-markdown
Open

Port the site documentation from APT to Markdown#12682
slachiewicz wants to merge 3 commits into
apache:masterfrom
slachiewicz:site-apt-to-markdown

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

Converts the 76 pages under src/site/apt to Markdown. APT is a format only
Doxia understands; Markdown is already supported by maven-site-plugin out of
the box, so no POM change is needed.

The pages were converted with doxia-converter and then cleaned up by hand:

  • <<<code>>> becomes backticks, <<bold>> becomes **bold**, and
    {{{url}text}} becomes [text](url)
  • the ASF licence header becomes a single block HTML comment
  • a page whose only Velocity reference was ${project.name} is now a plain
    .md with the title spelled out
  • a page that keeps a reference stays a .vm. Velocity reads ## as a line
    comment and would silently swallow every ATX heading below level one, so
    subsections use setext underlines and anything deeper is wrapped in
    #[[ ... ]]#
  • a reference the page means to display rather than resolve is written
    ${esc.d}{...}

Verified by building the site before and after the change and comparing every
generated page. The visible text and the link targets are unchanged, apart
from <b>/<i> rendering as <strong>/<em> and quotes and ellipses in
prose picking up the Markdown module's typographic substitution.

The four modules under its/ could not be built in my environment, so their
five pages are converted but unverified. Their %{snippet} macros were checked
by hand against the originals.

Part of the wider migration tracked in
apache/maven-doxia-converter#139

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on this APT-to-Markdown migration! The conversion is well-executed across most of the 76 files — links, tables, macros, license headers, and Velocity template handling are all cleanly converted.

A handful of conversion artifacts worth addressing before merge:

Medium:

  1. Spurious HTML anchors in property references${maven.home} became $<a id="maven.home"></a>maven.home in configuration-management.md (6 occurrences) and getting-to-container-configured-mojos.md (1 occurrence). These should remain as literal ${maven.home} or in backticks.

  2. Lost structure in Properties subsection — In configuration-management.md, the "Properties" subsection heading became plain text and three property definitions collapsed into a single paragraph, losing readability.

  3. XML elements rendered as emphasis<developerConnection/> became _developerConnection/_ (italic) in configuration-management.md (3 occurrences). Should use backticks: `<developerConnection/>`.

Low:
4. Leading spaces in link text[ Settings Reference](...) instead of [Settings Reference](...) in maven-settings/index.md (5 links), maven-compat/index.md (1 link), and artifact-handlers.md (1 link).

  1. unknown code fence language — 12 code fences across 6 files use ```unknown as language identifier. Should use bare ``` or ```text.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of gnodet

@slachiewicz
slachiewicz force-pushed the site-apt-to-markdown branch 2 times, most recently from 49627cf to 913d842 Compare August 6, 2026 11:50
A pure rename, so that git records it and `git log --follow` and `git blame` still
reach the history of each page after the conversion that follows. The content is
still APT at this point and the site does not build between the two commits.
@slachiewicz
slachiewicz force-pushed the site-apt-to-markdown branch 2 times, most recently from de70e2e to e7dabca Compare August 6, 2026 13:46
38 page(s) converted with doxia-converter and then cleaned up by hand:

- <<<code>>> becomes backticks, <<bold>> becomes **bold**, {{{url}text}}
  becomes [text](url)
- the ASF license header becomes a single block HTML comment
- a page whose only Velocity reference was ${project.name} is now a plain
  .md with the title spelled out
- a page that keeps a reference stays a .vm. Velocity reads ## as a line
  comment and would silently swallow every ATX heading below level one, so
  subsections use setext underlines and anything deeper is wrapped in
  #[[ ... ]]#
- a reference APT rendered literally is escaped with ${esc.d}

Two tests read the dependency types table straight out of the site
documentation to check it against DefaultTypeProvider, so they follow the
page to Markdown. APT let a table carry a second header row part way down to
group the rows beneath it; a Markdown table has one header row only, so those
group labels are now ordinary rows carrying bold text, and the tests skip a
row whose only filled column is the first.

Verified by building the site before and after and comparing every generated
page: the visible text and the link targets are unchanged apart from <b>/<i>
becoming <strong>/<em> and quotes and ellipses in prose picking up the
Markdown module's typographic substitution. The four modules under its/ could
not be built here, so their five pages are converted but unverified.
@slachiewicz
slachiewicz force-pushed the site-apt-to-markdown branch from e7dabca to a1d6473 Compare August 6, 2026 15:38

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All 5 previously identified conversion artifacts have been fixed in the latest commits:

  1. ✅ Spurious HTML anchors in property references — now properly rendered in backticks
  2. ✅ Lost structure in Properties subsection — proper heading and fenced code block
  3. ✅ XML elements rendered as emphasis — now using backticks
  4. ✅ Leading spaces in link text — cleaned up
  5. ✅ Unknown code fence language — removed

The Velocity template handling in .md.vm files is well done, and the test file updates correctly parse the new Markdown table format.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of gnodet

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work restoring the YAML front matter metadata across all 38 files — titles, authors, and dates are all correctly carried over from the original APT headers, and the YAML syntax (including list format for multi-author files) is consistent throughout.

One small omission:

impl/maven-core/src/site/markdown/getting-to-container-configured-mojos.md — The original APT header includes date: 2005-04-29, but the restored YAML front matter only has title and author. The companion file offline-mode.md correctly restores its APT date (2005-04-08), so this one appears to have been missed. Adding date: 2005-04-29 would make it consistent.

An APT document opens with a header block giving its title, authors and date, and
doxia-converter turns that into YAML front matter. The port removed the front
matter along with the converter's per-line licence comments, so the generated
pages lost their author and date meta tags, and took their title from the first
heading rather than from the document title.

The front matter has to come first in the file: the Markdown parser only looks for
it when the source begins with "---".
@slachiewicz
slachiewicz force-pushed the site-apt-to-markdown branch from b5b1792 to 19b6223 Compare August 7, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants