File tree 3 files changed +29
-0
lines changed
3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 105
105
# Short title used e.g. for <title> HTML tags.
106
106
html_short_title = '%s Documentation' % release
107
107
108
+ # Deployment preview information, from Netlify
109
+ # (See netlify.toml and https://docs.netlify.com/configure-builds/environment-variables/#git-metadata)
110
+ html_context = {
111
+ "is_deployment_preview" : os .getenv ("IS_DEPLOYMENT_PREVIEW" ),
112
+ "repository_url" : os .getenv ("REPOSITORY_URL" ),
113
+ "pr_id" : os .getenv ("REVIEW_ID" )
114
+ }
115
+
108
116
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
109
117
# using the given strftime format.
110
118
html_last_updated_fmt = '%b %d, %Y'
Original file line number Diff line number Diff line change 8
8
< a href ="/3/{{ pagename }}{{ file_suffix }} "> {% trans %} Python documentation for the current stable release{% endtrans %}</ a > .
9
9
</ div >
10
10
{%- endif %}
11
+
12
+ {%- if is_deployment_preview %}
13
+ < div id ="deployment-preview-warning " style ="padding: .5em; text-align: center; background-color: #fff2ba; color: #6a580e; ">
14
+ < div style ="float: right; margin-top: -10px; margin-left: 10px; ">
15
+ < a href ="https://www.netlify.com ">
16
+ < img src ="https://www.netlify.com/img/global/badges/netlify-color-accent.svg " alt ="Deploys by Netlify " />
17
+ </ a >
18
+ </ div >
19
+ {% trans %}This is a deploy preview created from a < a href ="{{ repository_url }}/pull/{{ pr_id }} "> pull request</ a > .
20
+ For authoritative documentation, see the {% endtrans %}
21
+ < a href ="https://docs.python.org/3/{{ pagename }}{{ file_suffix }} "> {% trans %} the current stable release{% endtrans %}</ a > .
22
+ </ div >
23
+ {%- endif %}
11
24
{% endblock %}
12
25
13
26
{% block rootrellink %}
Original file line number Diff line number Diff line change
1
+ [build ]
2
+ base = " Doc/"
3
+ command = " make html"
4
+ publish = " build/html"
5
+
6
+ [build .environment ]
7
+ PYTHON_VERSION = " 3.8"
8
+ IS_DEPLOYMENT_PREVIEW = " true"
You can’t perform that action at this time.
0 commit comments