Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4b311a2

Browse files
authored
Merge pull request #23351 from jklymak/doc-dev-install-mpl-theme
DOC/MNT install docs with dev version of sphinx theme
2 parents d276edb + 2565a0b commit 4b311a2

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

.circleci/config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ commands:
100100
numpy<< parameters.numpy_version >> codecov coverage \
101101
-r requirements/doc/doc-requirements.txt
102102
103+
mpl-theme-install:
104+
steps:
105+
- run:
106+
name: Install mpl-sphinx-theme dev
107+
command: |
108+
pip install git+https://github.com/matplotlib/mpl-sphinx-theme.git
109+
103110
mpl-install:
104111
steps:
105112
- run:

doc/_static/mpl.css

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
:root {
2-
--sd-color-primary: #11557C;
3-
--sd-color-primary-highlight: #003c63;
2+
--pst-color-link: var(--pst-color-primary);
3+
--pst-color-link-hover: var(--pst-color-secondary);
4+
--sd-color-primary: var(--pst-color-primary);
5+
--sd-color-primary-text: var(--pst-color-text-base);
46
}
57

68
.simple li>p {
@@ -51,6 +53,10 @@ does not float with it.
5153
margin: 5px 2px;
5254
}
5355

56+
html[data-theme="dark"] .sphx-glr-thumbcontainer {
57+
background-color: rgb(63, 63, 63);
58+
}
59+
5460
/* workaround: the default padding decenters the image inside the frame */
5561
.sphx-glr-thumbcontainer .figure {
5662
padding: 0;

doc/conf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
329329
html_logo = "_static/logo2.svg"
330330
html_theme_options = {
331331
"native_site": True,
332-
"logo": {"link": "index"},
333332
# collapse_navigation in pydata-sphinx-theme is slow, so skipped for local
334333
# and CI builds https://github.com/pydata/pydata-sphinx-theme/pull/386
335334
"collapse_navigation": not is_release_build,
@@ -342,7 +341,10 @@ def matplotlib_reduced_latex_scraper(block, block_vars, gallery_conf,
342341
'stable' if matplotlib.__version_info__.releaselevel == 'final'
343342
else 'devdocs')
344343
},
345-
"navbar_end": ["version-switcher", "mpl_icon_links"]
344+
"logo": {"link": "index",
345+
"image_light": "images/logo2.svg",
346+
"image_dark": "images/logo_dark.svg"},
347+
"navbar_end": ["version-switcher", "mpl_icon_links", "theme-switcher"]
346348
}
347349
include_analytics = is_release_build
348350
if include_analytics:

doc/index.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ Learning resources
4444
.. grid:: 1 1 2 2
4545

4646
.. grid-item-card::
47-
:class-header: sd-bg-light
4847
:padding: 2
4948

5049
Tutorials
@@ -56,7 +55,6 @@ Learning resources
5655
- :doc:`External learning resources <users/resources/index>`
5756

5857
.. grid-item-card::
59-
:class-header: sd-bg-light
6058
:padding: 2
6159

6260
How-tos
@@ -66,7 +64,6 @@ Learning resources
6664
- :doc:`Matplotlib FAQ <users/faq/index>`
6765

6866
.. grid-item-card::
69-
:class-header: sd-bg-light
7067
:padding: 2
7168

7269
Understand how Matplotlib works
@@ -79,7 +76,6 @@ Learning resources
7976
material
8077

8178
.. grid-item-card::
82-
:class-header: sd-bg-light
8379
:padding: 2
8480

8581
Reference

0 commit comments

Comments
 (0)