Walks the HTML files pkgdown generated from .qmd articles, restores
callout markup with fix_quarto_callouts(), undoes pkgdown's corruption
of Quarto tabsets with fix_quarto_tabsets(), detects code annotations
with fix_quarto_annotations(), and - for any file that contains a
tabset or code annotation - links in the small
quartofix.css/quartofix.js assets that restore their styling and
interactivity (copied once into <dst_path>/quartofix/).
Arguments
- dst_path
Path to the built pkgdown site (
docs/by default).- pkg_path
Path to the package root, used to locate the
.qmdsource of each article (searched undervignettes/) so thatfix_quarto_callouts()can recover callout types lost to custom titles. Set toNULLto skip source lookup entirely.- pattern
Regex selecting which HTML files to inspect. Defaults to every
.htmlfile, which is harmless but slower on large sites; narrow it (e.g."^articles/") if you know where your Quarto articles land.
Details
Run this after pkgdown::build_site() (or build_articles()), since it
operates on the rendered HTML, not the .qmd source.