File tree 2 files changed +14
-4
lines changed 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -231,13 +231,16 @@ <h3>{{ _('Navigation') }}</h3>
231
231
endtrans %}
232
232
{%- endif %}
233
233
{%- endif %}
234
+ < br />
234
235
{%- if last_updated %}
235
- {% trans last_updated=last_updated|e %}Last updated on {{ last_updated
236
- }}.{% endtrans %}
236
+ {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
237
237
{%- endif %}
238
238
{%- if show_sphinx %}
239
- {% trans sphinx_version=sphinx_version|e %}Created using < a
240
- href ="http://sphinx-doc.org/ "> Sphinx</ a > {{ sphinx_version }}.{% endtrans %}
239
+ {% trans sphinx_version=sphinx_version|e %}Created using
240
+ < ahref ="http://sphinx-doc.org/"> Sphinx</ a > {{ sphinx_version }}.{% endtrans %}
241
+ {%- endif %}
242
+ {%- if sha %}
243
+ Doc version {{ sha }}.
241
244
{%- endif %}
242
245
</ div >
243
246
{%- endblock %}
Original file line number Diff line number Diff line change @@ -145,11 +145,18 @@ def _check_deps():
145
145
master_doc = 'contents'
146
146
147
147
# General substitutions.
148
+ from matplotlib .compat .subprocess import check_output
149
+ SHA = check_output (['git' , 'describe' , '--dirty' ]).decode ('utf-8' ).strip ()
150
+
151
+ html_context = {'sha' : SHA }
152
+
148
153
project = 'Matplotlib'
149
154
copyright = ('2002 - 2012 John Hunter, Darren Dale, Eric Firing, '
150
155
'Michael Droettboom and the Matplotlib development '
151
156
'team; 2012 - 2018 The Matplotlib development team' )
152
157
158
+
159
+
153
160
# The default replacements for |version| and |release|, also used in various
154
161
# other places throughout the built documents.
155
162
#
You can’t perform that action at this time.
0 commit comments