Post-process the rendered site

Source: R/postprocess.R

Adds the finishing touches Quarto cannot do on its own: autolinks function calls to their documentation, tidies cross-reference markup, and writes the metadata that lets other packages link into this site.

Usage

postprocess_site(pkg = ".", quiet = TRUE)

Arguments

pkg

Path to the package root directory

quiet

Suppress progress messages

Value

Invisibly returns the number of pages modified

Details

This runs as a Quarto post-render script, wired into the generated ⁠_quarto.yml⁠, so it applies to ⁠quarto render⁠ and ⁠quarto preview⁠ as well as build_site().

It is the qrtdown equivalent of pkgdown’s tweak_page(): the rendered HTML is parsed with xml2 and edited in place. Autolinking happens here rather than at generation time because Quarto has already syntax-highlighted the code blocks by this point – existing highlight spans get wrapped in links rather than re-highlighted from scratch.

Set postrender: false in ⁠_qrtdown.yml⁠ to skip the hook.