hugo/content/en/about/hugo-and-gdpr.md
Bjørn Erik Pedersen b239595af5 Squashed 'docs/' changes from 0fd7b4169..501c6e233
501c6e233 Remoe speakerdeck example
9529bd27d Fix typos
530f22cd3 Remove language assuming knowledge of GitHub OAuth
c618809e7 Refer to Go by its proper name, not its domain name
06e23168b Add timeout parameter to configuration docs
034fa62a7 Update shortcodes.md
10ea79335 Document .Ordinal on shortcode
0bfd85fb9 Formatting
e44f80fdf Release 0.41
76164258c releaser: Add release notes to /docs for release of 0.41
8d87505eb releaser: Bump versions for release of 0.41
2bbc003ee docs: Document the GDPR Privacy Config
e2d11564d Merge commit 'd2b1030060d3c91d5f9ffa3456418da16bd74f1d'

git-subtree-dir: docs
git-subtree-split: 501c6e23370fae21e2110e0d7ea0db6731b31779
2018-06-11 22:31:02 +02:00

3.6 KiB
Raw Blame History


title: Hugo and the General Data Protection Regulation (GDPR) linktitle: Hugo and GDPR description: About how to configure your Hugo site to meet the new regulations. date: 2018-05-25 layout: single keywords: ["GDPR", "Privacy", "Data Protection"] menu: docs: parent: "about" weight: 5 weight: 5 sections_weight: 5 draft: false aliases: [/privacy/,/gdpr/] toc: 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.
  • 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. config.toml).

{{< code-toggle file="config">}} [privacy] [privacy.disqus] disable = false [privacy.googleAnalytics] disable = false respectDoNotTrack = false anonymizeIP = false useSessionStorage = false [privacy.instagram] disable = false simple = false [privacy.speakerDeck] disable = false [privacy.twitter] disable = false enableDNT = false [privacy.vimeo] disable = 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="config">}} [privacy] [privacy.disqus] disable = true [privacy.googleAnalytics] disable = true [privacy.instagram] disable = true [privacy.speakerDeck] 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.

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 inlines styles provided by Hugo:

{{< code-toggle file="config">}} [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.

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.