1+1[1] 2
This article shows every element quartofix::quartofix() patches up after pkgdown::build_site(). Compare with the raw pkgdown output or the same article patched with quartofix2() instead.
Callouts like this one keep their default title (“Note”) and are recovered exactly - type, icon, and color included.
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.
quartofix() only rewrites the first paragraph’s default title. A callout title spanning multiple lines is not currently supported.
Running quartofix() more than once is safe - already-patched files are detected and skipped.
quartofix() must run after pkgdown::build_site(), not before - it patches the rendered HTML, not the .qmd source.
That doesn’t run the code:
pkgdown::build_site()
quartofix::quartofix()Rscript -e 'pkgdown::build_site(); quartofix::quartofix()'That runs the (R) code:
Here is an ordinary blockquote, to show it’s still intact:
Premature optimization is the root of all evil.
— Donald Knuth