[Python-checkins] [3.11] Docs: Only include Plausible for html, not for epub etc (GH-107637) (#107643)

hugovk webhook-mailer at python.org
Fri Aug 4 15:11:46 EDT 2023


https://github.com/python/cpython/commit/6a2f981418e781e4bdbb4ed257845a14a5e82874
commit: 6a2f981418e781e4bdbb4ed257845a14a5e82874
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: hugovk <hugovk at users.noreply.github.com>
date: 2023-08-04T13:11:42-06:00
summary:

[3.11] Docs: Only include Plausible for html, not for epub etc (GH-107637) (#107643)

Co-authored-by: Hugo van Kemenade <hugovk at users.noreply.github.com>

files:
M Doc/tools/templates/layout.html

diff --git a/Doc/tools/templates/layout.html b/Doc/tools/templates/layout.html
index 9832feba14167..80103158ea01e 100644
--- a/Doc/tools/templates/layout.html
+++ b/Doc/tools/templates/layout.html
@@ -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 %}



More information about the Python-checkins mailing list