Skip to content

Commit 8ff8b33

Browse files
committed
Use template to set sidebar
1 parent 75a8ced commit 8ff8b33

File tree

6 files changed

+20
-50
lines changed

6 files changed

+20
-50
lines changed

.github/workflows/docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
with:
5353
github_token: ${{ secrets.GITHUB_TOKEN }}
5454
publish_dir: ./docs/_build/html
55-
exclude_assets: '.buildinfo'
55+
exclude_assets: '.buildinfo,_static/jquery-*.js,_static/underscore-*.js'
5656
destination_dir: ./latest
5757
keep_files: false
5858
full_commit_message: Deploy latest to GitHub Pages

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ __pycache__
99
build
1010
dist
1111
.tmp
12+
.DS_Store
13+
/docs/sample
14+
/docs/_build
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<nav class="bd-links" id="bd-docs-nav" aria-label="{{ _('Site navigation') }}">
2+
<p class="bd-links__title" role="heading" aria-level="1">
3+
<a href="{{ pathto('index') }}">{{ project }} Documentation</a>
4+
</p>
5+
<div class="bd-toc-item navbar-nav">
6+
{{ generate_toctree_html("sidebar", startdepth=0, maxdepth=1, collapse=True, includehidden=True, titles_only=True) }}
7+
</div>
8+
</nav>

docs/conf.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
# ones.
3939
extensions = [
4040
'sample_summaries',
41-
'sidebar',
4241
'sphinx_design',
4342
]
4443

@@ -58,13 +57,18 @@
5857
#
5958
html_theme = "mpl_sphinx_theme"
6059
html_theme_options = {
61-
"native_site": False,
60+
"navbar_links": "absolute",
6261
"show_prev_next": False,
63-
"logo": {"image_light": "images/logo2.svg",
62+
"logo": {"link": "https://matplotlib.org/stable/",
63+
"image_light": "images/logo2.svg",
6464
"image_dark": "images/logo_dark.svg"},
65+
"collapse_navigation": False,
66+
}
67+
html_sidebars = {
68+
"**": ["mpl_third_party_sidebar.html", "sidebar-nav-bs.html"]
6569
}
6670

6771
# Add any paths that contain custom static files (such as style sheets) here,
6872
# relative to this directory. They are copied after the builtin static files,
6973
# so a file named "default.css" will overwrite the builtin "default.css".
70-
html_static_path = ['_static']
74+
# html_static_path = ['_static']

docs/index.rst

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
.. module:: pytest-mpl
44

55
.. toctree::
6-
:caption: pytest-mpl Documentation
76
:hidden:
87

98
installing

docs/sidebar.py

-44
This file was deleted.

0 commit comments

Comments
 (0)