Skip to content

Commit e0d42e5

Browse files
authored
Merge pull request #61 from QuLogic/light-logo
Make logo names consistent
2 parents 63bac41 + b22196b commit e0d42e5

File tree

7 files changed

+14
-47
lines changed

7 files changed

+14
-47
lines changed

README.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@ installation.
1919

2020
See the ``docs/conf.py`` file for other settings.
2121

22-
There are three main templates that replace the defaults in ``pydata-sphinx-theme``:
22+
There are two main templates that replace the defaults in ``pydata-sphinx-theme``:
2323

2424
.. code-block::
2525
26-
navbar_start = mpl_navbar_logo.html
2726
navbar_center = mpl_nav_bar.html
2827
navbar_end = mpl_icon_links.html
2928
30-
Note that the option ``html_logo`` need not be specified as it is included
31-
in ``mpl_sphinx_theme/mpl_navbar_logo.html``. The logo is stored at
32-
``mpl_sphinx_theme/static/images/logo2.svg``.
29+
Note that the logo options need not be specified as they are included in theme
30+
initialization. The logo is stored at
31+
``mpl_sphinx_theme/static/logo_{light,dark}.svg``.
3332

3433
To change the top navbar, edit ``mpl_sphinx_theme/mpl_nav_bar.html``
3534

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
html_theme_options = {
4747
# logo is installed by mpl-sphinx-theme as:
4848
# "logo": {"link": "https://matplotlib.org/stable/",
49-
# "image_light": "_static/logo2.svg",
49+
# "image_light": "_static/logo_light.svg",
5050
# "image_dark": "_static/logo_dark.svg"},
5151
# if this default is OK, then no need to modify "logo"
5252
# collapse_navigation in pydata-sphinx-theme is slow, so skipped for local

docs/index.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,16 @@ line in your conf.py file
2020
And by including ``mpl_sphinx_theme`` as a requirement in your documentation
2121
installation.
2222

23-
There are three main templates that replace the defaults in ``pydata-sphinx-theme``:
23+
There are two main templates that replace the defaults in ``pydata-sphinx-theme``:
2424

2525
.. code-block::
2626
27-
navbar_start = mpl_navbar_logo.html
2827
navbar_center = mpl_nav_bar.html
2928
navbar_end = mpl_icon_links.html
3029
31-
Note that the option ``html_logo`` need not be specified as it is included
32-
in ``mpl_sphinx_theme/mpl_navbar_logo.html``. The logo is stored at
33-
``mpl_sphinx_theme/static/images/logo2.svg``.
30+
Note that the logo options need not be specified as they are included in theme
31+
initialization. The logo is stored at
32+
``mpl_sphinx_theme/static/logo_{light,dark}.svg``.
3433

3534
To change the top navbar, edit ``mpl_sphinx_theme/mpl_nav_bar.html``
3635

@@ -77,4 +76,4 @@ Configuration for this demo
7776

7877
The full ``conf.py`` is
7978

80-
.. literalinclude:: conf.py
79+
.. literalinclude:: conf.py

mpl_sphinx_theme/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
def set_config_defaults(app):
7-
7+
"""Set default logo in theme options."""
88
try:
99
theme = app.builder.theme_options
1010
except AttributeError:
@@ -17,7 +17,7 @@ def set_config_defaults(app):
1717
if "image_dark" not in logo:
1818
logo["image_dark"] = "_static/logo_dark.svg"
1919
if "image_light" not in logo:
20-
logo["image_light"] = "_static/logo2.svg"
20+
logo["image_light"] = "_static/logo_light.svg"
2121
if "link" not in logo:
2222
logo["link"] = "https://matplotlib.org/stable/"
2323
theme["logo"] = logo

mpl_sphinx_theme/mpl_navbar_logo.html

Lines changed: 0 additions & 30 deletions
This file was deleted.

mpl_sphinx_theme/static/logo2.svg renamed to mpl_sphinx_theme/static/logo_light.svg

Lines changed: 1 addition & 1 deletion
Loading

mpl_sphinx_theme/theme.conf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ stylesheet = css/style.css
44

55
[options]
66
navbar_links = absolute
7-
# navbar_start = mpl_navbar_logo.html
87
navbar_center = mpl_nav_bar.html
98
navbar_end = theme-switcher.html, mpl_icon_links.html
10-
logo = images/logo2.svg
9+
logo = logo_light.svg

0 commit comments

Comments
 (0)