Convert the demo archetypes' pages to Markdown - #146
Merged
Conversation
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends the Markdown-only treatment to the two sibling demo archetypes. Both handed a generated
project an APT
src/sitewhile shippingmarkdown.mdandmarkdown-velocity.md.vmbeside 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
plugin-site/…/apt/index.aptplugin-site/…/apt/usage.aptplugin-site/…/apt/examples/example.aptsite-simple/…/apt/index.aptThat is the difference from
maven-archetype-sitein #144, whereformat.aptexisted only toshow 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.apt→index.mdstill producesindex.html.Every
hrefin both menus resolves exactly as before, and no page is removed, so there is nothingto prune. Both menus are left alone.
For the record, entries like
faq.html,plugin-info.html,changes-report.htmlandjira-report.htmlpoint at pages the template does not contain — they are placeholders for theuser 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.aptis nowsrc/site/markdown/index.md, byte-identical to what thearchetype 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, goalclean site) run before and after —they generate a project and build its site:
<title>/author/datemetadata,structural tag sequence, and anchor id set
The only diff anywhere is the absolute build path inside
distribution-management.html, whichdiffers 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/siteas a<fileSet>withoutfiltered="false", so I checked whether##would be swallowed as a Velocityline comment at generate time. It is not:
### Subsectionin the existingmarkdown.mdsurvives generation and renders as
<h3>, and${artifactId}in the generatedsite.xmlis notsubstituted either —
src/siteis effectively unfiltered. So these pages keep ordinary ATXheadings; no setext workaround is needed for
.mdtemplate 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.mdkeeps itsplaceholder
Title Here/Author Here/Date Here (AAAA-MM-DD), which is what the templateis for.
Local runs are JDK 21 / Maven 3.9.16 / macOS only; CI is the real check.
Generated with assistance from Claude Opus 5.