Skip to content

Commit

Permalink
Merge branch 'logo-link'
Browse files Browse the repository at this point in the history
  • Loading branch information
tsibley committed Jan 27, 2022
2 parents 2d5a852 + ee3cf4e commit 9ee6650
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@ your ``conf.py`` file:
html_theme = "nextstrain-sphinx-theme"
This theme is based on sphinx_rtd_theme_ and accepts all of the same
`configuration options`_ settable via ``html_theme_option``. One additional
option is supported:
`configuration options`_ settable via ``html_theme_option``. Two additional
options are supported:

:logo: Boolean determining if the Nextstrain logo should be displayed.
Defaults to true.

:logo_link: URL to use for the logo's link. Defaults to
<https://docs.nextstrain.org>.

If your project wants to display its own logo, just set Sphinx's ``html_logo``
to point to the image file in your Sphinx project.

Expand Down
2 changes: 1 addition & 1 deletion lib/nextstrain/sphinx/theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{% set logo = logo if logo else 'nextstrain-logo.svg' if theme_logo else '' %}

{% if logo %}
<a href="https://nextstrain.org">
<a href="{{ theme_logo_link }}">
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="{{ _('Logo') }}"/>
</a>
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions lib/nextstrain/sphinx/theme/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ pygments_style = default
[options]
style_nav_header_background = #f2f2f2
logo = True
logo_link = https://docs.nextstrain.org

0 comments on commit 9ee6650

Please sign in to comment.