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 f086513

Browse filesBrowse files
authored
Merge pull request #10211 from tacaswell/doc_add_sha_to_footer
Doc add sha to footer
2 parents e1c9ec5 + 6d414ee commit f086513
Copy full SHA for f086513

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
@@ -231,13 +231,16 @@ <h3>{{ _('Navigation') }}</h3>
231231
endtrans %}
232232
{%- endif %}
233233
{%- endif %}
234+
<br />
234235
{%- 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 %}
237237
{%- endif %}
238238
{%- 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 }}.
241244
{%- endif %}
242245
</div>
243246
{%- 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
@@ -145,11 +145,18 @@ def _check_deps():
145145
master_doc = 'contents'
146146

147147
# 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+
148153
project = 'Matplotlib'
149154
copyright = ('2002 - 2012 John Hunter, Darren Dale, Eric Firing, '
150155
'Michael Droettboom and the Matplotlib development '
151156
'team; 2012 - 2018 The Matplotlib development team')
152157

158+
159+
153160
# The default replacements for |version| and |release|, also used in various
154161
# other places throughout the built documents.
155162
#

0 commit comments

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