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

Yhg1s webhook-mailer at python.org
Fri Aug 4 16:20:50 EDT 2023


https://github.com/python/cpython/commit/0e7a4f733685e7a7ccf28d850bae1b2222977362
commit: 0e7a4f733685e7a7ccf28d850bae1b2222977362
branch: 3.12
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Yhg1s <thomas at python.org>
date: 2023-08-04T22:20:46+02:00
summary:

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

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 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