1

I am very new to the R Notebook universe and have been blown away by the ease and efficiency of the R Notebook --> knitr --> HTML workflow. I have mainly been using the rmdformts and Tufte templates.

My institution has recently implemented something called Content Security Policy (CSP, e.g. see here ) on its servers. Now all the beautiful 'knitr(ed)'' web pages are displayed without CSS and Javascript.

Can someone please advise how to incorporate the correct CSP into the R-Notebook so that knitr includes it under the HTML meta tag?

Many thanks!

  • Messing with whether CSS and Javascript are inlined may help, maybe `self_contained: false`? See https://rmarkdown.rstudio.com/html_document_format.html#document_dependencies –  Apr 29 '18 at 22:15
  • @dash2 Your suggestion was spot on. This created local folders that keep the CSP happy. Thank you! – Chammika Udalagama May 02 '18 at 08:31
  • I'll put it as an answer. –  May 02 '18 at 16:29

1 Answers1

0

One way that may work is to include

self_contained: false

in the YAML header of the rmarkdown document.