Skip to content
Open
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
8 changes: 8 additions & 0 deletions _templates/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% extends "!page.html" %}

{% block extrahead %}
{{ super() }}
{% if not READTHEDOCS %}
<script defer data-domain="devguide.python.org" src="https://analytics.python.org/js/script.outbound-links.js"></script>
{% endif %}
{% endblock %}
6 changes: 6 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
import os
from urllib.request import urlopen

extensions = [
Expand Down Expand Up @@ -37,6 +38,7 @@
"source_repository": "https://github.com/python/devguide",
"source_branch": "main",
}
templates_path = ['_templates']
html_static_path = ['_static']
html_css_files = [
'devguide_overrides.css',
Expand All @@ -50,6 +52,10 @@
# Set to '' to prevent appending "documentation" to the site title
html_title = ""

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

linkcheck_allowed_redirects = {
# Edit page
r"https://docs.google.com/document/d/.*/": r"https://docs.google.com/document/d/.*/edit", # noqa: E501
Expand Down
Loading