pkgdown is a great tool for generating a website with documentation for an R package.
But in Germany due to GDPR, it’s only allowed to do so after the user has given his consent.
There was a verdict in Germany that you need the consent of the user before you are allowed to embed Google fonts (see German article https://www.golem.de/news/landgericht-muenchen-einbindung-von-google-fonts-ist-rechtswidrig-2202-162826.html). It’s expected that this is also true for other resources delivered by CDNs.
So I was looking for a simple solution to host a pkgdown site in Germany.
The solution is a custom theme that contains all critical files and doesn’t reference to CDNs. And how do you use such a custom theme? ** Build a package! **
So I wrote
It only overwrites the critical files of the original theme.
Using the package is simple. After installing it locally you only need to add
this to your
1 2 3
template: bootstrap: 5 package: pkgdown4gdpr
This package is still work in progress. It works for me. There may be configurations or options which trigger downloading further files. So please double-check on your own when using this package.