docs: migrate README.md / README-EN.md to a single NRG template - #46
Open
andriishin wants to merge 1 commit into
Open
docs: migrate README.md / README-EN.md to a single NRG template#46andriishin wants to merge 1 commit into
andriishin wants to merge 1 commit into
Conversation
andriishin
force-pushed
the
nrg-migration
branch
from
April 28, 2026 06:42
79e226b to
38ddab6
Compare
Replaces the two hand-maintained READMEs (Chinese + English) with a single README.src.md, regenerated by nrg-maven-plugin during the compile phase. Both outputs are byte-identical to the originals (modulo a 2-line auto-generated header NRG injects at the top). The non-default English filename README-EN.md is preserved through nrg.fileNamePattern.en. Chinese remains the default language so README.md continues to point to the Chinese version.
andriishin
force-pushed
the
nrg-migration
branch
from
April 28, 2026 07:39
38ddab6 to
17060c3
Compare
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.
Why
README.md(Chinese) andREADME-EN.md(English) are hand-maintained side-by-side. Every README change means editing the same paragraph in two places.This PR migrates both files to a single source-of-truth template using Nanolaba Readme Generator (NRG) — a small Java 8 Maven plugin that turns one
README.src.mdinto N localized README files on every build.What changes
README.src.md— the unified source. Each line is tagged<!--zh-->or<!--en-->so it appears only in that language's output. Generated programmatically; outputs are byte-identical to today's files (modulo a 2-line auto-generated header).pom.xml— addscom.nanolaba:nrg-maven-plugin:1.1to<build><plugins>aftermaven-compiler-plugin, with<inherited>false</inherited>. Bound to thecompilephase.README.md(+2 lines),README-EN.md(+2 lines) — regenerated. The only change is the 2-line auto-generated header at the top.Verification
Locally, regenerating with NRG
1.1from Maven Central against currentmasterproduces output that diffs against the originals only by the 2-line auto-generated header. Zero functional content change.How to regenerate locally
About NRG
com.nanolaba:readme-generator— open-source, Apache 2.0, Java 8+. Ships as CLI, Maven plugin, GitHub Action, and library.