Skip to content

Commit 5d2b419

Browse files
authored
Merge pull request #54 from tacaswell/mnt/restore_doc_sha
Mnt/restore doc sha
2 parents eac516a + 10630d1 commit 5d2b419

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/mpl_sphinx_theme.egg-info/
22
/mpl_sphinx_theme/__pycache__/
3+
build

Diff for: mpl_sphinx_theme/__init__.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ def mpl_path(path):
3131
# For more details, see:
3232
# https://www.sphinx-doc.org/en/master/development/theming.html#distribute-your-theme-as-a-python-package
3333
def setup(app):
34-
app.add_html_theme("mpl_sphinx_theme",
35-
str(Path(__file__).parent.resolve()))
34+
here = Path(__file__).parent.resolve()
35+
# Include component templates
36+
app.config.templates_path.append(str(here / "components"))
37+
38+
app.add_html_theme("mpl_sphinx_theme", str(here))
3639
app.connect("html-page-context", setup_html_page_context)
3740
return {'version': __version__, 'parallel_read_safe': True}

Diff for: mpl_sphinx_theme/components/doc_version.html

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{% if doc_version %}
2+
<p class="sphinx-version">
3+
Built from {{ doc_version }}.
4+
<br/>
5+
</p>
6+
{% endif %}

Diff for: setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"static/images/*.ico",
2323
"static/js/*.js",
2424
"static/font/*.*",
25+
"components/*.html",
2526
]
2627
},
2728
include_package_data=True,

0 commit comments

Comments
 (0)