Skip to content

docs: Harmonize README and pkgdown front page rendering - #193

Open
krlmlr wants to merge 2 commits into
claude/duplicate-repos-init-gf826x-pakfrom
claude/pkgdown-harmonization
Open

docs: Harmonize README and pkgdown front page rendering#193
krlmlr wants to merge 2 commits into
claude/duplicate-repos-init-gf826x-pakfrom
claude/pkgdown-harmonization

Conversation

@krlmlr

@krlmlr krlmlr commented Sep 13, 2026

Copy link
Copy Markdown
Member

Part of a fleet-wide pkgdown harmonization. Stacked on #190 (the pak::pak() README change), so any conflict surfaces here rather than at merge time; that commit drops out once #190 merges. The output format lands in cynkra/cynkratemplate#116, and the CI step that will keep these files current in cynkra/cynkratemplate#118.

What changes

README.Rmd declares output: cynkratemplate::readme_document — a github_document that also writes the pkgdown front page from the same render. It carries -smart and --wrap=preserve, so no smart quotes and no reflowing to 72 columns, which makes future diffs sentence-level.

index.md is the same render truncated at the first horizontal rule, so the front page no longer repeats the boilerplate pkgdown already shows in its sidebar. .Rbuildignore is updated in the same commit.

A reproducibility fix

This README was not deterministic: here() prints the project root, which is /home/runner/work/here/here on CI and something different on every maintainer's machine. Every render produced a different file.

The existing clean_output hook now pins it, alongside the normalisations it already applied:

x <- gsub(here::here(), "/home/here", x, fixed = TRUE)

That matters more than tidiness: cynkra/cynkratemplate#118 re-renders READMEs in CI and commits the result, and a README that renders differently every time would commit noise on every scheduled run. Two consecutive renders are now byte-identical.

Reproducing

rmarkdown::render("README.Rmd")   # or devtools::build_readme(), or Knit

cynkratemplate must be installed; it supplies the output format.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m


Generated by Claude Code

@krlmlr
krlmlr changed the base branch from main to claude/duplicate-repos-init-gf826x-pak September 13, 2026 09:40
@krlmlr
krlmlr force-pushed the claude/pkgdown-harmonization branch 2 times, most recently from c3548b5 to 93616ea Compare September 13, 2026 20:36
@krlmlr
krlmlr added this pull request to stack #202 September 13, 2026 21:48
krlmlr and others added 2 commits September 13, 2026 23:48
Part of harmonizing how `README.md` and the pkgdown front page are
produced across the fleet.

The output format becomes `cynkratemplate::readme_document`, which is a
`github_document` that also writes the pkgdown front page from the same
render. It carries `-smart` and `--wrap=preserve`, matching duckdb-r,
which has used them longest: together they keep the pandoc pass close to
an identity transform, so no smart quotes and no reflowing to 72
columns. That keeps the rendered file close to its source and makes
future diffs sentence-level rather than whole-paragraph.

Stating the format by name rather than repeating its settings means the
settings live in one place instead of thirty.

Rendering is unchanged in how it is invoked: `rmarkdown::render()`,
`devtools::build_readme()` and the Knit button all work as before, and
all now produce both files. The only new requirement is that
cynkratemplate be installed.

No prose changes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
Output of `cynkratemplate::render_readme()`, with no hand edits.

`README.md` changes are the pandoc settings from the previous commit
taking effect: `--wrap=preserve` stops badge lines and sentences being
broken at 72 columns, and `-smart` leaves quotes and dashes as written.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
@krlmlr
krlmlr force-pushed the claude/pkgdown-harmonization branch from 93616ea to f6469c8 Compare September 13, 2026 21:48
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