hugo/content/en/about/hugo-and-gdpr.md
Bjørn Erik Pedersen d3927310d5 Squashed 'docs/' changes from 39af43ef1..1798dc0d5
1798dc0d5 Update theme
403fa716e Update CLI documentation (#2092)
aade5a09e Correct media subtype example
53cd9dea6 netlify: Hugo 0.112.3
b78b86cb1 Add source/target warning to resources.Copy (#2091)
50c299729 netlify: Hugo 0.112.2
73197046f Change config.xxx to hugo.xxx throughout the documentation (#2090)
d489d4c6f Add hugo.WorkingDir to docs (#2089)
7487df809 Fix typos (#2088)
6d0572cd6 netlify: Hugo 0.112.1
6838600b2 netlify: Hugo 0.112.0
513e7a80f Merge branch 'tempv0.112.0'
91eb44275 Some more about 0.112.0
bd3b33a27 docs: Regen docshelper
fb3027daf docs: Regen CLI docs
8e7b8e987 Merge commit 'f96384a3b596f9bc0a3a035970b09b2c601f0ccb'
a942ceef4 tpl/tplimpl: Add img loading attribute to figure shortcode  (#10927)
0e0c7b25e tpl/urls: Return empty string when JoinPath has zero args
310ce949a tpl/urls: Add JoinPath template function
ae435ca77 tpl: Add math.Abs
f340139f8 Revert "Update syntax-highlighting.md (#10929)" (#10930)
917a0e24d Update syntax-highlighting.md (#10929)

git-subtree-dir: docs
git-subtree-split: 1798dc0d54ce048dd975863b490cd809ef14268a
2023-05-27 16:59:59 +02:00

4.5 KiB
Raw Blame History

title linktitle description layout keywords menu weight aliases toc
Hugo and the General Data Protection Regulation (GDPR) Hugo and GDPR About how to configure your Hugo site to meet the new regulations. single
GDPR
Privacy
Data Protection
docs
parent weight
about 5
5
/privacy/
/gdpr/
true

General Data Protection Regulation (GDPR) is a regulation in EU law on data protection and privacy for all individuals within the European Union and the European Economic Area. It became enforceable on 25 May 2018.

Hugo is a static site generator. By using Hugo you are already standing on very solid ground. Static HTML files on disk are much easier to reason about compared to server and database driven web sites.

But even static websites can integrate with external services, so from version 0.41, Hugo provides a Privacy Config that covers the relevant built-in templates.

Note that:

  • These settings have their defaults setting set to off, i.e. how it worked before Hugo 0.41. You must do your own evaluation of your site and apply the appropriate settings.
  • These settings work with the internal templates. Some theme may contain custom templates for embedding services like Google Analytics. In that case these options have no effect.
  • We will continue this work and improve this further in future Hugo versions.

All Privacy Settings

Below are all privacy settings and their default value. These settings need to be put in your site config (e.g. hugo.toml).

{{< code-toggle file="hugo" >}} [privacy] [privacy.disqus] disable = false [privacy.googleAnalytics] disable = false respectDoNotTrack = false anonymizeIP = false useSessionStorage = false [privacy.instagram] disable = false simple = false [privacy.twitter] disable = false enableDNT = false simple = false [privacy.vimeo] disable = false enableDNT = false simple = false [privacy.youtube] disable = false privacyEnhanced = false {{< /code-toggle >}}

Disable All Services

An example Privacy Config that disables all the relevant services in Hugo. With this configuration, the other settings will not matter.

{{< code-toggle file="hugo" >}} [privacy] [privacy.disqus] disable = true [privacy.googleAnalytics] disable = true [privacy.instagram] disable = true [privacy.twitter] disable = true [privacy.vimeo] disable = true [privacy.youtube] disable = true {{< /code-toggle >}}

The Privacy Settings Explained

GoogleAnalytics

anonymizeIP
Enabling this will make it so the users' IP addresses are anonymized within Google Analytics.
respectDoNotTrack
Enabling this will make the GA templates respect the "Do Not Track" HTTP header.
useSessionStorage
Enabling this will disable the use of Cookies and use Session Storage to Store the GA Client ID.

{{% note %}} useSessionStorage is not supported when using Google Analytics v4 (gtag.js). {{% /note %}}

Instagram

simple
If simple mode is enabled, a static and no-JS version of the Instagram image card will be built. Note that this only supports image cards and the image itself will be fetched from Instagram's servers.

Note: If you use the simple mode for Instagram and a site styled with Bootstrap 4, you may want to disable the inline styles provided by Hugo:

{{< code-toggle file="hugo" >}} [services] [services.instagram] disableInlineCSS = true {{< /code-toggle >}}

Twitter

enableDNT
Enabling this for the twitter/tweet shortcode, the tweet and its embedded page on your site are not used for purposes that include personalized suggestions and personalized ads.
simple
If simple mode is enabled, a static and no-JS version of a tweet will be built.

Note: If you use the simple mode for Twitter, you may want to disable the inline styles provided by Hugo:

{{< code-toggle file="hugo" >}} [services] [services.twitter] disableInlineCSS = true {{< /code-toggle >}}

YouTube

privacyEnhanced
When you turn on privacy-enhanced mode, YouTube wont store information about visitors on your website unless the user plays the embedded video.

Vimeo

enableDNT
Enabling this for the vimeo shortcode, the Vimeo player will be blocked from tracking any session data, including all cookies and stats.
simple
If simple mode is enabled, the video thumbnail is fetched from Vimeo's servers and it is overlayed with a play button. If the user clicks to play the video, it will open in a new tab directly on Vimeo's website.