Cookie

The cookieProcessor adds a cookie warning template block. After the user consents, the cookie warning is hidden and cookies are set.

Usage

const docs = new Generator({
    processors: [cookieProcessor()],
});

Configuration

For a custom cookie warning, replace the template at partials/cookie-warning.html.

Make sure to use the same button id's and top cookie-warning class.

A processor that sets cookies should respect the cookie consent, for example Matomo. Do this by passing a callback to the global function withCookieConsent.

withCookieConsent(() => {
    // processor script
});

DANGER

This function is not publicly exported. If you need this please file a bug explaining your use-case.

Esc för att stänga Pil upp/ner för att navigera Enter för att välja