From 43517d2966f75b1520e736265fc06b4d577cb9ae Mon Sep 17 00:00:00 2001 From: Kaxil Naik Date: Fri, 10 May 2024 13:52:59 +0100 Subject: [PATCH] Add Scarf Pixel to Airflow RTD Theme (#1012) Similar to https://github.com/apache/superset/pull/25065 and https://github.com/apache/airflow/pull/39510 but this one doesn't need to wait for the VOTE since this adds a simple transparent tracking pixel. More detail in https://docs.scarf.sh/web-traffic/ All of this data will be available in Scarf, creds for which are shared to 1password for PMC members, and can be reported periodically in things like Town Hall or newsletters. --- landing-pages/site/layouts/partials/hooks/head-end.html | 3 +++ sphinx_airflow_theme/sphinx_airflow_theme/__init__.py | 2 +- sphinx_airflow_theme/sphinx_airflow_theme/layout.html | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/landing-pages/site/layouts/partials/hooks/head-end.html b/landing-pages/site/layouts/partials/hooks/head-end.html index c8404231051..4cfc67a632f 100644 --- a/landing-pages/site/layouts/partials/hooks/head-end.html +++ b/landing-pages/site/layouts/partials/hooks/head-end.html @@ -46,6 +46,9 @@ })(); + + + {{ with .Site.Data.webpack }} diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/__init__.py b/sphinx_airflow_theme/sphinx_airflow_theme/__init__.py index fcd4e040602..b383314376a 100644 --- a/sphinx_airflow_theme/sphinx_airflow_theme/__init__.py +++ b/sphinx_airflow_theme/sphinx_airflow_theme/__init__.py @@ -18,7 +18,7 @@ from os import path from sphinx.application import Sphinx -__version__ = '0.0.12' +__version__ = '0.0.13' __version_full__ = __version__ diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/layout.html b/sphinx_airflow_theme/sphinx_airflow_theme/layout.html index f9b454d326b..923f3790e8d 100644 --- a/sphinx_airflow_theme/sphinx_airflow_theme/layout.html +++ b/sphinx_airflow_theme/sphinx_airflow_theme/layout.html @@ -317,6 +317,9 @@ })(); + + + {%- block extrahead %} {% endblock %}