Middleman GDPR
Helps getting your Middleman website GDPR compliant
Installation
Add this line to your Gemfile:
gem 'middleman-gdpr'
And then execute:
$ bundle
Or install it yourself as:
$ gem install middleman-gdpr
Activate Sprockets and I18n:
activate :sprockets
activate :i18n
Add this to the layout:
<%= gdpr :cookie_consent %>
Add this to javascripts:
Add this to stylesheets:
@import 'gdpr/cookie_consent'
If your site isn't localized but you want gdpr messages to be in a given language (default: English), just add the corresponding option when activating I18n:
activate :i18n, langs: [:fr]
Set the privacy policy url in the locales.
Checklist
https://www.eugdpr.org/
Thanks
Inspired by cookies_eu (https://github.com/infinum/cookies_eu), thank you :)
Contributing
Feel free to pull request!
License
The gem is available as open source under the terms of the MIT License.