Skip to contents

This article shows every element quartofix::quartofix2() restores by re-rendering the .qmd source with Quarto and splicing the genuine nodes into pkgdown’s HTML after pkgdown::build_site(). Compare with the raw pkgdown output or the same article patched with quartofix() instead.

Callouts

Note

Callouts like this one keep their default title (“Note”) and are recovered exactly - type, icon, and color included.

TipThis one has a custom title

pkgdown’s render loses the callout type along with a custom title like this one - quartofix() recovers it anyway by reading the .qmd source that produced this page and matching callouts positionally.

Warning

quartofix() only rewrites the first paragraph’s default title. A callout title spanning multiple lines is not currently supported.

Caution

Running quartofix() more than once is safe - already-patched files are detected and skipped.

Important

quartofix() must run after pkgdown::build_site(), not before - it patches the rendered HTML, not the .qmd source.

Tabsets

That doesn’t run the code:

pkgdown::build_site()
quartofix::quartofix()
Rscript -e 'pkgdown::build_site(); quartofix::quartofix()'

That runs the (R) code:

1+1
[1] 2
Rscript -e 'pkgdown::build_site(); quartofix::quartofix()'

Code annotations

1pkgdown::build_site()
2quartofix::quartofix()
1
Builds the site as usual - Quarto articles render with callouts, tabsets, and annotations all degraded.
2
Walks docs/, restores callout markup, and links in the small quartofix.css/quartofix.js bundle wherever it’s needed.

A normal blockquote

Here is an ordinary blockquote, to show it’s still intact:

Premature optimization is the root of all evil.

— Donald Knuth