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 339
339
html_context = {
340
340
"is_deployment_preview" : os .getenv ("READTHEDOCS_VERSION_TYPE" ) == "external" ,
341
341
"repository_url" : repository_url .removesuffix (".git" ) if repository_url else None ,
342
- "pr_id" : os .getenv ("READTHEDOCS_VERSION" )
342
+ "pr_id" : os .getenv ("READTHEDOCS_VERSION" ),
343
+ "enable_analytics" : os .getenv ("PYTHON_DOCS_ENABLE_ANALYTICS" ),
343
344
}
344
345
345
346
# 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