Skip to content

Convert the demo archetypes' pages to Markdown - #146

Merged
slachiewicz merged 2 commits into
masterfrom
archetype-demos-markdown
Aug 10, 2026
Merged

Convert the demo archetypes' pages to Markdown#146
slachiewicz merged 2 commits into
masterfrom
archetype-demos-markdown

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

Extends the Markdown-only treatment to the two sibling demo archetypes. Both handed a generated
project an APT src/site while shipping markdown.md and markdown-velocity.md.vm beside it,
so a new project started life with two documentation formats and no reason to prefer either.

Independent of #144 — different files, no overlap.

Per-file judgement, as asked

file call why
plugin-site/…/apt/index.apt convert the sample plugin's front page — real content
plugin-site/…/apt/usage.apt convert a usage page the user fills in — real content
plugin-site/…/apt/examples/example.apt convert a worked SMTP-authentication example — real content
site-simple/…/apt/index.apt convert the generated project's landing page — real content
delete: none none of the four is a format demonstration

That is the difference from maven-archetype-site in #144, where format.apt existed only to
show what APT looks like and has no Markdown equivalent worth writing. Here every page carries
content that survives translation, so nothing is deleted.

Neither site descriptor needs a change — checked, not assumed

Conversion does not rename a generated page: index.aptindex.md still produces index.html.
Every href in both menus resolves exactly as before, and no page is removed, so there is nothing
to prune. Both menus are left alone.

For the record, entries like faq.html, plugin-info.html, changes-report.html and
jira-report.html point at pages the template does not contain — they are placeholders for the
user to enable, not breakage, and predate this change.

The reference fixture moves in lockstep

site-simple/src/test/resources/projects/it-basic/reference/ is the expected generated output.
Its src/site/apt/index.apt is now src/site/markdown/index.md, byte-identical to what the
archetype produces. The IT compares the two, so this is a real regression test rather than a
copy that has to be kept in step by hand.

Verification

Both archetypes' ITs (archetype:integration-test, goal clean site) run before and after —
they generate a project and build its site:

  • both pass, including site-simple's reference comparison
  • the same pages are produced on both sides
  • every generated page is identical in visible text, <title>/author/date metadata,
    structural tag sequence, and anchor id set

The only diff anywhere is the absolute build path inside distribution-management.html, which
differs because the two runs were in different directories.

Two things established by measurement, worth recording

Archetype filtering does not eat ATX headings. Both descriptors ship src/site as a
<fileSet> without filtered="false", so I checked whether ## would be swallowed as a Velocity
line comment at generate time. It is not: ### Subsection in the existing markdown.md
survives generation and renders as <h3>, and ${artifactId} in the generated site.xml is not
substituted either — src/site is effectively unfiltered. So these pages keep ordinary ATX
headings; no setext workaround is needed for .md template content.

Metadata is taken from each page's own APT header, not harmonised across siblings — the four
pages declare different authors and dates and keep them. site-simple/index.md keeps its
placeholder Title Here / Author Here / Date Here (AAAA-MM-DD), which is what the template
is for.

Local runs are JDK 21 / Maven 3.9.16 / macOS only; CI is the real check.

Generated with assistance from Claude Opus 5.

The plugin-site and site-simple archetypes still hand a generated project
an APT src/site while shipping Markdown examples beside it. Move the four
template pages, and the reference fixture that mirrors one of them, so the
conversion shows up as an edit rather than a delete and an add.

The fixture under src/test/resources is the expected generated output the
archetype's integration test compares against, so it has to move with the
template rather than stay as it is.

Generated-by: Claude Opus 5 (1M context)
Both archetypes handed a generated project an APT src/site while shipping
Markdown examples beside it, so a new project started life with two
documentation formats and no reason to prefer either.

All four pages are content rather than format demonstration, so all four
are converted and none deleted. That is the difference from the site
archetype, where format.apt existed only to show what APT looks like and
has no Markdown equivalent worth writing.

Neither site descriptor needs a change: conversion does not rename a
generated page, so every href in both menus still resolves exactly as
before. Their entries for faq.html, plugin-info.html and the report pages
are template placeholders for the user to fill in and are untouched.

The reference fixture under site-simple's src/test/resources is the
expected generated output, so it carries the converted page too - it is
a copy of what the archetype now produces, and the integration test
compares the two.

Verified by running both archetypes' ITs, which generate a project and
build its site, before and after: both pass, the same pages are produced,
and every one is identical in text, metadata, structural tags and anchor
ids. The lone diff is an absolute path in distribution-management, which
differs because the two builds ran in different directories.

Generated-by: Claude Opus 5 (1M context)
@slachiewicz slachiewicz added the documentation Improvements or additions to documentation label Aug 10, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review August 10, 2026 01:27
@slachiewicz
slachiewicz merged commit 8153282 into master Aug 10, 2026
14 of 15 checks passed
@slachiewicz
slachiewicz deleted the archetype-demos-markdown branch August 10, 2026 01:28
@github-actions github-actions Bot added this to the 1.6 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