Skip to content

Generate README.md and README.fr.md from a single README.src.md (NRG)#1383

Open
andriishin wants to merge 1 commit intoInseeFr:mainfrom
andriishin:add-nrg-template
Open

Generate README.md and README.fr.md from a single README.src.md (NRG)#1383
andriishin wants to merge 1 commit intoInseeFr:mainfrom
andriishin:add-nrg-template

Conversation

@andriishin
Copy link
Copy Markdown

Bonjour ! 👋 / Hi! This PR migrates README.md and README.fr.md to a single README.src.md template; both files are then regenerated by Nanolaba Readme Generator (NRG) during mvn compile.

Why / Pourquoi

Maintaining two parallel READMEs drifts over time. A single source of truth keeps them in lockstep — and it's a small change since the existing files already follow NRG's <base>.md / <base>.<lang>.md naming convention, no rename needed.

What changed / Ce qui change

  • New README.src.md (~37 lines) — single template covering both languages. Identical content (logo, badges, headings) appears once; per-language strings use the inline ${en:'…', fr:'…'} form. The Setup subsection lives in the EN file only (matching current behaviour where README.fr.md links back to the EN #Setup anchor).
  • Modified pom.xml — adds com.nanolaba:nrg-maven-plugin:1.0 (≈22-line <plugin> block at the end of the parent <build><plugins>). Default phase is compile, no extra config. Multi-module: the plugin runs once at the parent level, no per-module setup needed.
  • Modified README.md and README.fr.md — regenerated from the template; the only semantic change is a 2-line NRG-added header (<!-- This file was automatically generated by NRG 1.0 -->) so future contributors know to edit README.src.md instead. Body content is byte-identical to the current files.

How to verify / Vérification

  1. Run mvn compile (or ./mvnw compile if applicable) — NRG will regenerate both READMEs from README.src.md.
  2. git diff should be empty.
  3. To change a string in the README in the future, edit only README.src.md.

What NRG is

NRG is an Apache 2.0, Java 8 Markdown template engine purpose-built for multi-language READMEs. Distributed as a CLI, Maven plugin (already on Maven Central as com.nanolaba:nrg-maven-plugin:1.0), and Java library. Used to generate its own README from README.src.md.

If the migration angle doesn't fit Eno's direction, no problem — feel free to close. Happy to adjust the template (e.g. switch the inline form to per-line <!--lang--> markers, or split the Setup section). 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant