]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Docs: Only include Plausible for html, not for epub etc (GH-107637) (#107642)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 4 Aug 2023 20:20:46 +0000 (13:20 -0700)
committerGitHub <noreply@github.com>
Fri, 4 Aug 2023 20:20:46 +0000 (22:20 +0200)
Docs: Only include Plausible for html, not for epub etc (GH-107637)

Only include Plausible for html, not for epub etc
(cherry picked from commit 904b5319b3cc72063f4bfcd7beb3a1ef0fc641be)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Doc/tools/templates/layout.html

index 9832feba141675113edb824bef8464272a2878ec..80103158ea01e63cfa7d531c7ad16ee3cb13588b 100644 (file)
@@ -26,7 +26,9 @@
 {% endblock %}
 
 {% block extrahead %}
-    <script defer data-domain="docs.python.org" src="https://plausible.io/js/script.js"></script>
+    {% if builder == "html" %}
+      <script defer data-domain="docs.python.org" src="https://plausible.io/js/script.js"></script>
+    {% endif %}
     <link rel="canonical" href="https://docs.python.org/3/{{pagename}}.html" />
     {% if builder != "htmlhelp" %}
       {% if pagename == 'whatsnew/changelog' and not embedded %}