diff --git a/exampleSite/config.toml b/exampleSite/config.toml index e2ff5a70..0bd45bb5 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -151,6 +151,11 @@ defaultContentLanguageInSubdir = false # Enable native social sharing buttons? sharing = true + # Privacy pack + # Show a cookie consent message to visitors + # Anonymize IP in Google Analytics (if enabled) + privacy_pack = false + # Link custom CSS and JS assets # (relative to /static/css and /static/js respectively) custom_css = [] diff --git a/i18n/en.yaml b/i18n/en.yaml index 59aeafe8..eaddb05b 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -147,3 +147,14 @@ - id: 404_recommendations translation: Perhaps you were looking for one of these? + +# Cookie consent + +- id: cookie_message + translation: This website uses cookies to ensure you get the best experience on our website. + +- id: cookie_dismiss + translation: Got it! + +- id: cookie_learn + translation: Learn more diff --git a/layouts/partials/cookie_consent.html b/layouts/partials/cookie_consent.html new file mode 100644 index 00000000..71bac06b --- /dev/null +++ b/layouts/partials/cookie_consent.html @@ -0,0 +1,22 @@ +{{ if .Site.Params.privacy_pack }} + + + +{{ end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 9aec6947..70593290 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -81,6 +81,7 @@