An alternative to quartofix(). Instead of reconstructing callout and
tabset markup from what pkgdown left behind, this re-renders each
article's .qmd source with quarto::quarto_render() and splices the
genuine rendered nodes into pkgdown's HTML in place of the degraded ones.
This is more faithful to Quarto's actual output (no callout-type
guessing needed) but costs a second, full Quarto render per article,
which can be slow for expensive vignettes. Kept separate from
quartofix() while that tradeoff is evaluated.
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
Only articles with a discoverable .qmd source (see pkg_path) are
spliced; articles without one are left untouched. Code annotations are
not yet spliced by this function - they're handled the same way as
quartofix() (asset injection only).