File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 323
323
html_context = {
324
324
"is_deployment_preview" : os .getenv ("READTHEDOCS_VERSION_TYPE" ) == "external" ,
325
325
"repository_url" : repository_url .removesuffix (".git" ) if repository_url else None ,
326
- "pr_id" : os .getenv ("READTHEDOCS_VERSION" )
326
+ "pr_id" : os .getenv ("READTHEDOCS_VERSION" ),
327
+ "enable_analytics" : os .getenv ("PYTHON_DOCS_ENABLE_ANALYTICS" ),
327
328
}
328
329
329
330
# This 'Last updated on:' timestamp is inserted at the bottom of every page.
Original file line number Diff line number Diff line change 26
26
{% endblock %}
27
27
28
28
{% block extrahead %}
29
+ {% if builder == "html" and enable_analytics %}
30
+ < script defer data-domain ="docs.python.org " src ="https://plausible.io/js/script.js "> </ script >
31
+ {% endif %}
29
32
< link rel ="canonical " href ="https://docs.python.org/3/{{pagename}}.html " />
30
33
{% if builder != "htmlhelp" %}
31
34
{% if pagename == 'whatsnew/changelog' and not embedded %}
You can’t perform that action at this time.
0 commit comments