Skip to content

lespoupeesrusses/middleman-gdpr

Repository files navigation

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:

# config.rb
activate :sprockets
activate :i18n

Add this to the layout:

  <%= gdpr :cookie_consent %>

Add this to javascripts:

//= require gdpr/cookie_consent

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:

# config.rb
activate :i18n, langs: [:fr]

Set the privacy policy url in the locales.

Checklist

https://www.eugdpr.org/

  • Cookie consent
  • Privacy policy
  • There must be an optin
  • Optin must be unchecked by default
  • Account must be deletable
  • Users must have access to their data
  • Users must be able to modify their data

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.