github.com/rabbouni145/gg@v0.47.1/docs/content/en/about/hugo-and-gdpr.md (about) 1 2 3 --- 4 title: Hugo and the General Data Protection Regulation (GDPR) 5 linktitle: Hugo and GDPR 6 description: About how to configure your Hugo site to meet the new regulations. 7 date: 2018-05-25 8 layout: single 9 keywords: ["GDPR", "Privacy", "Data Protection"] 10 menu: 11 docs: 12 parent: "about" 13 weight: 5 14 weight: 5 15 sections_weight: 5 16 draft: false 17 aliases: [/privacy/,/gdpr/] 18 toc: true 19 --- 20 21 22 General Data Protection Regulation ([GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation)) 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. 23 24 **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.** 25 26 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. 27 28 Note that: 29 30 * 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. 31 * We will continue this work and improve this further in future Hugo versions. 32 33 ## All Privacy Settings 34 35 Below are all privacy settings and their default value. These settings need to be put in your site config (e.g. `config.toml`). 36 37 {{< code-toggle file="config">}} 38 [privacy] 39 [privacy.disqus] 40 disable = false 41 [privacy.googleAnalytics] 42 disable = false 43 respectDoNotTrack = false 44 anonymizeIP = false 45 useSessionStorage = false 46 [privacy.instagram] 47 disable = false 48 simple = false 49 [privacy.twitter] 50 disable = false 51 enableDNT = false 52 simple = false 53 [privacy.vimeo] 54 disable = false 55 simple = false 56 [privacy.youtube] 57 disable = false 58 privacyEnhanced = false 59 {{< /code-toggle >}} 60 61 62 ## Disable All Services 63 64 An example Privacy Config that disables all the relevant services in Hugo. With this configuration, the other settings will not matter. 65 66 {{< code-toggle file="config">}} 67 [privacy] 68 [privacy.disqus] 69 disable = true 70 [privacy.googleAnalytics] 71 disable = true 72 [privacy.instagram] 73 disable = true 74 [privacy.twitter] 75 disable = true 76 [privacy.vimeo] 77 disable = true 78 [privacy.youtube] 79 disable = true 80 {{< /code-toggle >}} 81 82 ## The Privacy Settings Explained 83 84 ### GoogleAnalytics 85 86 anonymizeIP 87 : Enabling this will make it so the users' IP addresses are anonymized within Google Analytics. 88 89 respectDoNotTrack 90 : Enabling this will make the GA templates respect the "Do Not Track" HTTP header. 91 92 useSessionStorage 93 : Enabling this will disable the use of Cookies and use Session Storage to Store the GA Client ID. 94 95 ### Instagram 96 97 simple 98 : 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. 99 100 **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: 101 102 {{< code-toggle file="config">}} 103 [services] 104 [services.instagram] 105 disableInlineCSS = true 106 {{< /code-toggle >}} 107 108 ### Twitter 109 110 enableDNT 111 : 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. 112 113 simple 114 : If simple mode is enabled, a static and no-JS version of a tweet will be built. 115 116 117 **Note:** If you use the _simple mode_ for Twitter, you may want to disable the inlines styles provided by Hugo: 118 119 {{< code-toggle file="config">}} 120 [services] 121 [services.twitter] 122 disableInlineCSS = true 123 {{< /code-toggle >}} 124 125 ### YouTube 126 127 privacyEnhanced 128 : When you turn on privacy-enhanced mode, YouTube won’t store information about visitors on your website unless the user plays the embedded video. 129 130 ### Vimeo 131 132 simple 133 : 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. 134