diff --git a/docsbuild/conf.py b/docsbuild/conf.py index 51992467..947145ab 100644 --- a/docsbuild/conf.py +++ b/docsbuild/conf.py @@ -65,3 +65,15 @@ html_content = { "display_github": "True", } + +# Add templates directory to the templates_path (for extensions and custom templates) +templates_path = [ + "templates", +] + +# -- Adding Umami details to header ---------------------------------------- + +html_context = { + "umami_script_src": "https://metrics.cloudera-labs.com/script.js", + "umami_website_id": "ec9cdd83-3798-4fd0-8c07-acb4efd971de", +} diff --git a/docsbuild/templates/layout.html b/docsbuild/templates/layout.html new file mode 100644 index 00000000..ab4eca35 --- /dev/null +++ b/docsbuild/templates/layout.html @@ -0,0 +1,13 @@ +{# _templates/layout.html #} +{% extends "!layout.html" %} {# Extends the theme's default layout.html #} + +{% block extrahead %} + {{ super() }} {# This calls the original extrahead block content from the theme's layout.html #} + + {# Your Umami script #} + {% if umami_script_src and umami_website_id %} + + {% endif %} +{% endblock %} + +{# All other sections of the upstream layout.html are kept as is. #}