From 93aec5133820652ca422789f1922485b2f09eb04 Mon Sep 17 00:00:00 2001 From: Jim Enright Date: Tue, 15 Jul 2025 14:47:53 +0100 Subject: [PATCH 1/4] Add Umami tracking to header Signed-off-by: Jim Enright --- docsbuild/conf.py | 12 ++++++++++++ docsbuild/templates/layout.html | 13 +++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 docsbuild/templates/layout.html diff --git a/docsbuild/conf.py b/docsbuild/conf.py index a374f3e2..122fd53b 100644 --- a/docsbuild/conf.py +++ b/docsbuild/conf.py @@ -77,3 +77,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://umami.52.209.169.249.demo.cloudera-labs.com/script.js", + "umami_website_id": "9fde217e-c791-44f0-aa94-e78bb59394b3", +} \ No newline at end of file diff --git a/docsbuild/templates/layout.html b/docsbuild/templates/layout.html new file mode 100644 index 00000000..11877fa4 --- /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. #} \ No newline at end of file From 1c4a13f148f0f94c83c74218e95e09355f8a05fb Mon Sep 17 00:00:00 2001 From: Jim Enright Date: Tue, 15 Jul 2025 14:47:54 +0100 Subject: [PATCH 2/4] Fix lint issues Signed-off-by: Jim Enright --- docsbuild/conf.py | 2 +- docsbuild/templates/layout.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docsbuild/conf.py b/docsbuild/conf.py index 122fd53b..c6614018 100644 --- a/docsbuild/conf.py +++ b/docsbuild/conf.py @@ -88,4 +88,4 @@ html_context = { "umami_script_src": "https://umami.52.209.169.249.demo.cloudera-labs.com/script.js", "umami_website_id": "9fde217e-c791-44f0-aa94-e78bb59394b3", -} \ No newline at end of file +} diff --git a/docsbuild/templates/layout.html b/docsbuild/templates/layout.html index 11877fa4..ab4eca35 100644 --- a/docsbuild/templates/layout.html +++ b/docsbuild/templates/layout.html @@ -10,4 +10,4 @@ {% endif %} {% endblock %} -{# All other sections of the upstream layout.html are kept as is. #} \ No newline at end of file +{# All other sections of the upstream layout.html are kept as is. #} From c1abf74c9d093dfe0e985d6713d9ff8682a663b8 Mon Sep 17 00:00:00 2001 From: Jim Enright Date: Tue, 15 Jul 2025 14:47:55 +0100 Subject: [PATCH 3/4] Update tracking id Signed-off-by: Jim Enright --- docsbuild/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docsbuild/conf.py b/docsbuild/conf.py index c6614018..00d3f935 100644 --- a/docsbuild/conf.py +++ b/docsbuild/conf.py @@ -86,6 +86,6 @@ # -- Adding Umami details to header ---------------------------------------- html_context = { - "umami_script_src": "https://umami.52.209.169.249.demo.cloudera-labs.com/script.js", - "umami_website_id": "9fde217e-c791-44f0-aa94-e78bb59394b3", -} + "umami_script_src": "https://metrics.cloudera-labs.com/script.js", + "umami_website_id": "ec9cdd83-3798-4fd0-8c07-acb4efd971de", +} \ No newline at end of file From 8b113e01fa9920831a62e5905b9eb63b3bf7a0c8 Mon Sep 17 00:00:00 2001 From: Jim Enright Date: Tue, 15 Jul 2025 15:32:18 +0100 Subject: [PATCH 4/4] Fix lint issues Signed-off-by: Jim Enright --- docsbuild/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docsbuild/conf.py b/docsbuild/conf.py index 00d3f935..9234d20d 100644 --- a/docsbuild/conf.py +++ b/docsbuild/conf.py @@ -88,4 +88,4 @@ html_context = { "umami_script_src": "https://metrics.cloudera-labs.com/script.js", "umami_website_id": "ec9cdd83-3798-4fd0-8c07-acb4efd971de", -} \ No newline at end of file +}