Skip to content

A Hugo module to integrate CookieYes with your Hinode site

License

Notifications You must be signed in to change notification settings

gethinode/mod-cookieyes

Repository files navigation

Hinode Module - CookieYes

A Hugo module to integrate CookieYes with your Hinode site

About

Logo

Hinode is a clean blog theme for Hugo, an open-source static site generator. Hinode is available as a template, and a main theme. This repository maintains a Hugo module to integrate CookieYes with your Hinode site. Visit the Hinode documentation site for installation instructions.

Contributing

This module uses semantic-release to automate the release of new versions. The package uses husky and commitlint to ensure commit messages adhere to the Conventional Commits specification. You can run npx git-cz from the terminal to help prepare the commit message.

Configuration

This module supports the following parameters (see the section params.modules in config.toml):

Setting Default Description
cookieyes.local false Trigger to force include the CookieYes scripts, bypassing other settings. Use this setting for debugging and testing only.
cookieyes.url Link to your personalized CookieYes script. See the installation code in the advanced settings of your CookieYes account. The code is available by clicking the button next to the cookie banner status. The link has the following pattern: https://cdn-cookieyes.com/client_data/{installation code}/script.js.

Installation

Please ensure mod-cookieyes is imported before the hinode module to ensure the correct script template is initialized. The following snippet illustrates an example configuration for hugo.toml.

[module]
  [[module.imports]]
    path = "github.com/gethinode/mod-cookieyes"
  [[module.imports]]
    path = "github.com/gethinode/hinode"

Content Security Policy

CookieYes requires several directives to be added to your Content Security Policy. See the policy requirements as provided by CookieYes for more details.