summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-05-07 17:19:41 +0300
committerYuriy Andamasov <yuriy@vyos.io>2026-05-07 18:23:25 +0300
commit4d8581c0e709848a601384addf3026fb405345fc (patch)
treedc34f359b4bbe79b26d77f7c092a9dbe872a2afe
parent52f78b43576615f686d161e91721c1a818685077 (diff)
downloadvyos-documentation-4d8581c0e709848a601384addf3026fb405345fc.tar.gz
vyos-documentation-4d8581c0e709848a601384addf3026fb405345fc.zip
feat(docs): read GTM_ID from environment instead of hardcoding
Move the Google Tag Manager container ID out of the template and into conf.py via os.environ.get('GTM_ID', ''), exposed to Jinja via html_context. Set GTM_ID in the RTD project environment variables. 🤖 Generated by [robots](https://vyos.io)
-rw-r--r--docs/_templates/layout.html1
-rw-r--r--docs/conf.py1
2 files changed, 1 insertions, 1 deletions
diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html
index 5116899f..cf25c15d 100644
--- a/docs/_templates/layout.html
+++ b/docs/_templates/layout.html
@@ -1,6 +1,5 @@
{% extends "!layout.html" %}
{%- set current_version = "1.5.x circinus" %}
-{%- set gtm_id = "GTM-T5VQHRT" %}
{% block extrahead %}
{# Cookiebot CMP — must load first so its auto-blocker can scan/block other tags #}
<script id="Cookiebot"
diff --git a/docs/conf.py b/docs/conf.py
index da462b0e..74ad1ff6 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -147,6 +147,7 @@ html_context = {
'github_repo': 'vyos-documentation',
'github_version': _github_version,
'conf_py_path': '/docs/',
+ 'gtm_id': os.environ.get('GTM_ID', ''),
}
# sphinx-sitemap: baseurl already includes /en/rolling/, so skip lang+version