Skip to content

Commit

Permalink
Merge pull request #54 from tacaswell/mnt/restore_doc_sha
Browse files Browse the repository at this point in the history
Mnt/restore doc sha
  • Loading branch information
QuLogic committed Jan 6, 2023
2 parents eac516a + 10630d1 commit 5d2b419
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/mpl_sphinx_theme.egg-info/
/mpl_sphinx_theme/__pycache__/
build
7 changes: 5 additions & 2 deletions mpl_sphinx_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ def mpl_path(path):
# For more details, see:
# https://www.sphinx-doc.org/en/master/development/theming.html#distribute-your-theme-as-a-python-package
def setup(app):
app.add_html_theme("mpl_sphinx_theme",
str(Path(__file__).parent.resolve()))
here = Path(__file__).parent.resolve()
# Include component templates
app.config.templates_path.append(str(here / "components"))

app.add_html_theme("mpl_sphinx_theme", str(here))
app.connect("html-page-context", setup_html_page_context)
return {'version': __version__, 'parallel_read_safe': True}
6 changes: 6 additions & 0 deletions mpl_sphinx_theme/components/doc_version.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% if doc_version %}
<p class="sphinx-version">
Built from {{ doc_version }}.
<br/>
</p>
{% endif %}
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"static/images/*.ico",
"static/js/*.js",
"static/font/*.*",
"components/*.html",
]
},
include_package_data=True,
Expand Down

0 comments on commit 5d2b419

Please sign in to comment.