docs: migrate README.md / README.ru.md to a single NRG template#2122
Open
andriishin wants to merge 1 commit into
Open
docs: migrate README.md / README.ru.md to a single NRG template#2122andriishin wants to merge 1 commit into
andriishin wants to merge 1 commit into
Conversation
Replaces the two hand-maintained READMEs with a single README.src.md, regenerated in CI by nanolaba/nrg-action@v1 (NRG 1.2) on push to v7. Both outputs are byte-identical to the originals (modulo a 2-line auto-generated header NRG injects at the top). Drift-check job runs in mode: check on PRs that touch the template or either README, failing the build with a unified diff when a contributor edits a generated file directly.
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(English) andREADME.ru.md(Russian) are hand-maintained side-by-side. As bem-components picks up new components, control variants, examples, this means editing the same paragraph in two places — easy to update one and let the other drift.This PR migrates both files to a single source-of-truth template using Nanolaba Readme Generator (NRG). Combined with
nanolaba/nrg-action@v1, regeneration happens in CI on every push tov7— no toolchain locally, just YAML.What changes
README.src.md— the unified source. Each line is tagged<!--en-->or<!--ru-->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)..github/workflows/nrg.yml— runsnanolaba/nrg-action@v1(pinned to NRG1.2):v7that touchesREADME.src.mdor the workflow file → regenerates and auto-commits any changed READMEs.mode: check), fails the build with a unified diff if a contributor edits a generated file directly without updating the template.README.md(+2 lines),README.ru.md(+2 lines) — regenerated. The only change is the 2-line auto-generated header at the top of each file.Verification
Locally, regenerating with NRG
1.2against currentv7produces output that diffs against the originals only by the 2-line auto-generated header. Zero functional content change.What's intentionally NOT in this PR
README.src.md.package.json, or any build step. Only README files and a docs workflow.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. Zero local toolchain needed when used through the action — Java is provisioned by the runner.