diff options
author | Bjørn Erik Pedersen <[email protected]> | 2018-05-24 12:25:52 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2018-05-24 12:25:52 +0200 |
commit | 9753cb59f1f1d866943a485dd7c917d1b68f6eda (patch) | |
tree | 99d98e265f94011689d0589b76ac49d6256edc16 /config | |
parent | 3bfe8f4be653f44674293685cb5750d90668b2f6 (diff) | |
download | hugo-9753cb59f1f1d866943a485dd7c917d1b68f6eda.tar.gz hugo-9753cb59f1f1d866943a485dd7c917d1b68f6eda.zip |
Support DNT in Twitter shortcode for GDPR
Fixes #4765
Diffstat (limited to 'config')
-rw-r--r-- | config/privacy/privacyConfig.go | 4 | ||||
-rw-r--r-- | config/privacy/privacyConfig_test.go | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/config/privacy/privacyConfig.go b/config/privacy/privacyConfig.go index bcffec8af..9c2a8df66 100644 --- a/config/privacy/privacyConfig.go +++ b/config/privacy/privacyConfig.go @@ -67,6 +67,10 @@ type SpeakerDeck struct { // Twitter holds the privacy configuration settingsrelated to the Twitter shortcode. type Twitter struct { Service `mapstructure:",squash"` + + // When set to true, the Tweet and its embedded page on your site are not used + // for purposes that include personalized suggestions and personalized ads. + EnableDNT bool } // Vimeo holds the privacy configuration settingsrelated to the Vimeo shortcode. diff --git a/config/privacy/privacyConfig_test.go b/config/privacy/privacyConfig_test.go index 0efc734db..6b07ef7e6 100644 --- a/config/privacy/privacyConfig_test.go +++ b/config/privacy/privacyConfig_test.go @@ -41,6 +41,7 @@ simple = true disable = true [privacy.twitter] disable = true +enableDNT = true [privacy.vimeo] disable = true [privacy.youtube] @@ -62,6 +63,7 @@ simple = true assert.True(pc.Instagram.Simple) assert.True(pc.SpeakerDeck.Disable) assert.True(pc.Twitter.Disable) + assert.True(pc.Twitter.EnableDNT) assert.True(pc.Vimeo.Disable) assert.True(pc.YouTube.PrivacyEnhanced) |