Hugo + LoveIt Theme + GDPR & Cookie Policy
I use and like the LoveIt theme for Hugo, it was developed outside EU/UK and they are lucky because they don’t need to show the stupid Cookies/GDPR banner in every website. There are a lot of pages who explain how to add the banner but…no one for the LoveIt Theme. Working around and as a workaround I finally catch how to.
I use iubenda as cookie and consent solution for the GDPR, it works and - for my website without any sort of cookies - it’s enough. Before starting take a look to the Hugo doc who explains how to be GDPR compliant.
My small setup is more or less:
- Go to cookiesdirective.com website and download the zip/script file, create a cookielaw folder into content, open the zip file and move the two requested files:
|
|
-
Create an account (free) on iubenda.com, generate a policy.
-
Move into your Hugo directory and create a new file:
|
|
and add:
|
|
Remember to change the number 12345678 in href="//www.iubenda.com/privacy-policy/12345678 with your iubenda ID.
- Move into your Hugo directory and edit the file:
|
|
add this line
|
|
before the end of the file, just before the first /div.
- Save and run a
hugo serve