Add code to HTML header in Quarto without modifying the preamble
I am writing an R package which needs to add JavaScript functions to the <head>
of an HTML file created by Rmarkdown or Quarto. I do not have control over the YAML preamble, so I cannot use include-in-header
. I need a programmatic way to modify the HTML header.