CookieConsent

view/plugin/cookie_consent~ CookieConsent

A JSX component for alerting users about the use of cookies.

Constructor

new CookieConsent()

Source:
See:
Example
<CookieConsent
    head={true}
    type="info"
    theme="classic"
    static={false}
    position="bottom-left"
    policyLink="/path/to/cookie/policy"
    text={{
        message: 'This website uses cookies to improve your experience.',
        dismiss: 'Got it!',
        allow: 'Allow cookies',
        deny: 'Decline',
        link: 'Learn more',
        policy: 'Cookie Policy',
    }}
    cssUrl="/path/to/cookieconsent.css"
    jsUrl="/path/to/cookieconsent.js" />

Members

(static) Cacheable

Cacheable JSX component for alerting users about the use of cookies.

This class is supposed to be used in combination with the locals hexo filter (module:hexo/filter/locals).

Source:
See:
Example
<CookieConsent.Cacheable
    head={true}
    plugin={{
        info: "info",
        theme: "classic",
        static: false,
        position: "bottom-left",
        policyLink: "/path/to/cookie/policy"
    }}
    helper={{
        __: function() {...},
        cdn: function() {...}
    }} />