1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-12-19 00:52:19 +01:00

Optional use of cookie consent.

Setting the url in the configuration enables cookie consent.
This commit is contained in:
Frank Tegtmeyer 2016-11-03 10:05:00 +01:00
parent 5d3e273d49
commit d3617237bb
3 changed files with 35 additions and 2 deletions

View File

@ -43,6 +43,13 @@ paginate = 5
# verification string for Yandex Webmaster Tools
#yandex_verify_meta = "66b077430f35f04a"
# Cookie consent (my be required for your site in the European Union)
# Set the "more info" URL in this parameter. You have to
# provide a document page for this URL - see the example website
# To avoid a menu entry for this information page add it to
# conten/info instead of content/page or content.
# cookie_consent_info_url = "/cookie-information/"
[params.sidebar]
# Optional about block for sidebar (can be Markdown)
about = "A simple Hugo theme based on the [Bootstrap v4 blog example](http://v4-alpha.getbootstrap.com/examples/blog/)."

View File

@ -0,0 +1,22 @@
+++
date = "2014-11-20T13:49:43+01:00"
title = "Cookie information"
draft = false
description = "Information about use of cookies on this site."
url = "/cookie-information/"
+++
This site uses cookies - small text files that are placed on your machine.
To be able to optimize the site and to measure it's success
the site uses third party cookies by Google Analytics.
You may prefer to disable cookies on this site and on others.
The most effective way to do this is to disable cookies in your browser.
I suggest consulting the Help section of your browser or taking a
look at <a href="http://www.aboutcookies.org" target="_blank">the About Cookies website</a>
which offers guidance for all modern browsers.
<a href="https://tools.google.com/dlpage/gaoptout?hl=en" target="_blank">Google also provides a browser plugin</a> which disables tracking through
Google Analytics.

View File

@ -16,7 +16,11 @@
<link href="{{ .Site.RSSLink }}" type="application/rss+xml" rel="alternate">
{{ template "_internal/google_analytics_async.html" . }}
</head>
{{ if .Site.Params.cookie_consent_info_url }}
{{ partial "cookie_consent.html" . }}
{{ end }}
</head>
<body>
@ -24,7 +28,7 @@
<div class="container">
<nav class="nav blog-nav">
<a class="nav-link {{ if .IsHome }}active{{ end }}" href="{{ .Site.BaseURL | absLangURL }}">{{ i18n "home" }}</a>
{{ range where .Site.Pages "Type" "!=" "post" }}
{{ range where .Site.Pages "Type" "==" "page" }}
<a class="nav-link" href="{{ .Permalink }}">{{ .Title }}</a>
{{ end }}
</nav>