Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6d414ee

Browse filesBrowse files
committed
DOC: put SHA of source used to build docs in footer
1 parent 874116f commit 6d414ee
Copy full SHA for 6d414ee

File tree

Expand file treeCollapse file tree

2 files changed

+14
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+14
-4
lines changed

‎doc/_templates/layout.html

Copy file name to clipboardExpand all lines: doc/_templates/layout.html
+7-4Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,16 @@ <h3>{{ _('Navigation') }}</h3>
229229
endtrans %}
230230
{%- endif %}
231231
{%- endif %}
232+
<br />
232233
{%- if last_updated %}
233-
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated
234-
}}.{% endtrans %}
234+
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
235235
{%- endif %}
236236
{%- if show_sphinx %}
237-
{% trans sphinx_version=sphinx_version|e %}Created using <a
238-
href="http://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
237+
{% trans sphinx_version=sphinx_version|e %}Created using
238+
<ahref="http://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
239+
{%- endif %}
240+
{%- if sha %}
241+
Doc version {{ sha }}.
239242
{%- endif %}
240243
</div>
241244
{%- endblock %}

‎doc/conf.py

Copy file name to clipboardExpand all lines: doc/conf.py
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,18 @@ def _check_deps():
151151
master_doc = 'contents'
152152

153153
# General substitutions.
154+
from matplotlib.compat.subprocess import check_output
155+
SHA = check_output(['git', 'describe', '--dirty']).decode('utf-8').strip()
156+
157+
html_context = {'sha': SHA}
158+
154159
project = 'Matplotlib'
155160
copyright = ('2002 - 2012 John Hunter, Darren Dale, Eric Firing, '
156161
'Michael Droettboom and the Matplotlib development '
157162
'team; 2012 - 2017 The Matplotlib development team')
158163

164+
165+
159166
# The default replacements for |version| and |release|, also used in various
160167
# other places throughout the built documents.
161168
#

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.