Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% block extrahead %}
{{ super() }}
{% if not READTHEDOCS %}
{% if not is_deployment_preview %}
<script defer data-domain="devguide.python.org" src="https://analytics.python.org/js/script.outbound-links.js"></script>
{% endif %}
{% endblock %}
6 changes: 5 additions & 1 deletion conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@
# Set to '' to prevent appending "documentation" to the site title
html_title = ""

# Deployment preview information
# (See .readthedocs.yaml and https://docs.readthedocs.io/en/stable/reference/environment-variables.html)
is_deployment_preview = os.getenv("READTHEDOCS_VERSION_TYPE") == "external"

html_context = {
"READTHEDOCS": bool(os.getenv("READTHEDOCS")),
"is_deployment_preview": is_deployment_preview,
}

linkcheck_allowed_redirects = {
Expand Down
Loading