I'm updating an old pkgdown website, and I'm having some trouble with html that should be injected in the <head> of articles (from vignettes). For the standalone vignette I have
---
title: "Dimer"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
rmarkdown::html_vignette:
includes:
in_header: "../../inst/_x3d_header.html"
---
where the in_header field points to html lines that load some javascript library (x3dom) needed later on the page. This works fine for the vignette, however when I run pkgdown on the package, the header content isn't present. With a previous version of pkgdown I found that
pkgdown:
as_is: true
output:
rmarkdown::html_vignette:
includes:
in_header: "../../inst/_x3d_header.html"
sorted things out (albeit with some minor css formatting quirks). Updating pkgdown to the dev version (which seemed warranted to remove a deprecated markdown_github warning), however, I no longer see the header stuff being used. There's some mention of in-header.html which sounds like what I need, but I have no idea where to place it and tell pkgdown about it in the build_site() process.
pkgdown can now use the templates “in-header.html”/“after-head.html”, “before-body.html” and “after-body.html” whose content will be placed (similarly to bookdown options
in_header,before_bodyandafter_body), respectively, at the end of the<head>tag; right below the opening<body>tag; and before the closing tag</body>(#1487).