Skip to content

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

Merged
krlmlr merged 2 commits into
claude/duplicate-repos-init-gf826x-pakfrom
claude/pkgdown-harmonization
Sep 13, 2026
Merged

krlmlr merged 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 #747 (the pak::pak() README change) so any conflict between the two surfaces here rather than at merge time — that PR's commit is the first of the commits below, and will drop out once it merges.

The tooling this calls lands in cynkra/cynkratemplate#116, with the fixes in cynkra/cynkratemplate#124.

Commits

  1. docs: Use pak::pak() — from docs: Use pak::pak() for the development install #747, shown for context
  2. Adopt the shared rendering configuration — YAML only, no prose changes
  3. Render README.md and index.md — tool output, no hand edits

(There is no separate drift commit: this package's README.md was already in sync with README.Rmd, which is not true everywhere.)

What changes and why

The output format gains md_extensions: "-smart" and pandoc_args: ["--wrap=preserve"], matching duckdb-r, which has used them longest. They keep the pandoc pass close to an identity transform — no smart quotes, no reflowing to 72 columns. The visible effect is that badge lines stop being broken mid-link:

-[[Lifecycle:
-stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](…)
+[[Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](…)

It also makes future diffs sentence-level rather than whole-paragraph, which is what the house line-break convention is for.

index.md is new. It is the same render truncated at the first horizontal rule, so the pkgdown front page no longer repeats the code of conduct notice that pkgdown already puts in its sidebar. Added to .Rbuildignore in the same commit, since an unignored top-level index.md is an R CMD check --as-cran NOTE.

Both files now come from a single pandoc pass via cynkratemplate::render_readme(), so they cannot drift apart in formatting the way the hand-maintained pairs elsewhere in the fleet have — by four to fourteen months in the worst cases.

The example output is truncated at max.print = 100, which the output format pins during the render. Without it the two mtcars dumps came out at full length, thirty-odd lines each, and their length depended on whatever the rendering session happened to have set. The [ reached 'max' / getOption("max.print") -- omitted N rows ] markers in the diff are that limit taking effect, not a change to the example.

Reproducing

cynkratemplate::render_readme()

Rendering this README requires RSQLite installed, since the examples open a connection.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m

@krlmlr
krlmlr force-pushed the claude/pkgdown-harmonization branch 2 times, most recently from a11a639 to bc9372f Compare September 13, 2026 07:46
@krlmlr
krlmlr changed the base branch from main to claude/duplicate-repos-init-gf826x-pak September 13, 2026 09:39
@krlmlr
krlmlr force-pushed the claude/pkgdown-harmonization branch from bc9372f to 217e464 Compare September 13, 2026 13:18
@krlmlr
krlmlr added this pull request to stack #753 September 13, 2026 14:07
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 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
@krlmlr
krlmlr force-pushed the claude/pkgdown-harmonization branch from 217e464 to 99834e3 Compare September 13, 2026 16:55
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 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WWhverMTZZKgEpUuTK117m
@krlmlr
krlmlr force-pushed the claude/pkgdown-harmonization branch from 99834e3 to 6af1517 Compare September 13, 2026 20:30
@krlmlr
krlmlr merged commit 312276c into main Sep 13, 2026
6 checks passed
@krlmlr
krlmlr deleted the claude/pkgdown-harmonization branch September 13, 2026 20:40
@krlmlr krlmlr mentioned this pull request Nov 28, 2026
3 of 7 tasks
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