diff --git a/_resource/overrides/main.html b/_resource/overrides/main.html index d9e06b8c..b8029b48 100644 --- a/_resource/overrides/main.html +++ b/_resource/overrides/main.html @@ -6,7 +6,11 @@ {# Import the theme's layout. #} {% extends "base.html" %} - + {% block scripts %} + + {{ super() }} + {% endblock %} + {% block extrahead %} {{ super() }} {% set title = config.site_name %} diff --git a/docs/index.md b/docs/index.md index ca6b1cf2..a90911c8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -50,6 +50,6 @@ Our comprehensive resources will help you overcome challenges, from everyday iss - +[Change privacy settings](#__consent) diff --git a/docs/js/consent.js b/docs/js/consent.js new file mode 100644 index 00000000..b6f8a8ac --- /dev/null +++ b/docs/js/consent.js @@ -0,0 +1,6 @@ +var consent = __md_get("__consent") +if (consent && consent.custom) { + /* The user accepted the cookie */ +} else { + /* The user rejected the cookie */ +} \ No newline at end of file diff --git a/mkdocs-base.yml b/mkdocs-base.yml index 374d5c89..a30f75c7 100644 --- a/mkdocs-base.yml +++ b/mkdocs-base.yml @@ -55,7 +55,8 @@ extra_css: extra_javascript: - js/promptremover.js - - js/feedback.js + - js/consent.js +# - js/feedback.js markdown_extensions: abbr: {} @@ -147,6 +148,7 @@ extra: cookies: analytics: Google Analytics github: Github + custom: Osano actions: - manage - accept