Skip to content

docs: Derive README.md from a README.Rmd - #2905

Open
krlmlr wants to merge 2 commits into
claude/sembrfrom
claude/readme-rmd
Open

krlmlr wants to merge 2 commits into
claude/sembrfrom
claude/readme-rmd

Conversation

@krlmlr

@krlmlr krlmlr commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Last of six packages to join the shared README rendering pipeline, after r-dbi/DBItest#565, r-dbi/RMariaDB#562, r-dbi/RPostgres#609, r-dbi/RKazam#115 and cynkra/cynkratemplate#127.

README.Rmd is a byte-for-byte copy of the existing README.md, prefixed only with the cynkratemplate::readme_document front matter and the canonical generated-file comment. README.md is then the output of cynkratemplate::render_readme().

No index.md here: cynkratemplate only writes one when the README has a code-of-conduct footer to strip for pkgdown, and this one does not. So .Rbuildignore gains ^README\.Rmd$ only.

The allcontributors block

This README is 3942 lines, of which 3680 are the raw-HTML contributors table. Pandoc has to carry all of it through a markdown → AST → markdown round trip, so that block was the thing to check before anything else.

It survives intact, but it does grow. Pandoc inserts a blank line between the raw-HTML fragments, which takes README.md from 3942 to 5108 lines. That is the entire reason this diff is 1364 lines. Nothing inside the block is reworded, reindented or rewrapped:

  • The 3682 non-blank lines of the block are byte-identical and in identical order before and after (diff of the blank-stripped block: empty).
  • The multiset of all https?:// URLs in the file is identical, 1767 of them each side — this is the check that matters, since the block carries an avatar URL and two profile URLs per contributor.
  • pandoc -f gfm -t html over both files produces identical output apart from the added generated-file comment, so what GitHub renders does not change.

The block is generated, so the expansion is not permanent churn in one direction: allcontributors::add_contributors() defaults to files = c("README.Rmd", "README.md"), so the next release-checklist run rewrites the block in both files in its own compact form, and the following render re-expands the README.md copy. Worth knowing before the next release, since it will show up as a large diff again.

If the growth is unwanted, this is one commit on its own branch and can simply be dropped.

Everything else

Outside the block, 14 old lines change and 11 new ones appear, all of them pandoc's gfm normalisations:

  • the three-line generated-file comment, plus a blank line after it and after <!-- badges: start -->
  • three ```r fences written as ``` r
  • the one untagged ``` fence written as a four-space indented block, contents unchanged
  • R >= 4.0 written as R \>= 4.0 in prose, which renders the same
  • one trailing space and the four trailing blank lines dropped

Verified mechanically rather than by eye: the sorted multiset of whitespace-separated tokens differs only by the words of the generated-file comment and by the three fence tags and the one backslash listed above. No word, no URL and no code-block content changes anywhere in the file.

Build

R CMD build succeeds with no warnings, vignettes and compiled sources included. tar tzf on the resulting tarball shows no top-level README.Rmd, README.md or index.md — the only README entries are vendored ones under src/.

Where this sits

Stacked on claude/sembr (#2903), which is the current tip of the open chain — #2904 on claude/fix-man-drift was closed because main already carries that fix, so building on it would drag an abandoned change into this diff. It is stacked rather than inserted at the bottom of the chain so that #2902 and #2903 do not need rewriting. Only .Rbuildignore, README.Rmd and README.md are touched; nothing under R/.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m


Generated by Claude Code

@krlmlr
krlmlr force-pushed the claude/readme-rmd branch 2 times, most recently from 85c9569 to b4f1889 Compare September 13, 2026 18:19
@krlmlr
krlmlr force-pushed the claude/readme-rmd branch 2 times, most recently from 66ac5ce to 08d2ab2 Compare September 13, 2026 18:50
@krlmlr
krlmlr added this pull request to stack #2907 September 13, 2026 21:25
krlmlr and others added 2 commits September 13, 2026 23:41
The hand-written `README.md` keeps the package out of the shared rendering pipeline,
so this adds a `README.Rmd` copied from it verbatim,
prefixed with the `cynkratemplate::readme_document` front matter and the canonical generated-file comment.

Rendering with `cynkratemplate::render_readme()` writes no `index.md` here,
because this `README.md` has no code-of-conduct footer to strip,
so only `README.Rmd` is added to `.Rbuildignore`.

Outside the contributors table the rendered `README.md` differs from the hand-written one
only in pandoc's gfm normalisations:
the generated-file comment, a blank line after `<!-- badges: start -->`,
` ```r ` written as ` ``` r `, an untagged fence written as an indented block,
`>=` written as `\>=`, and trailing blank lines dropped.

Inside the `allcontributors` block pandoc preserves every non-blank line byte for byte
and inserts a blank line between the raw-HTML fragments,
which grows the file by 1171 lines without changing what it renders to.
No word, URL, or code-block content changes anywhere.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
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