Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve breadcrumbs and version verbiage #15

Merged
merged 4 commits into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,24 @@ 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``. Two additional
options are supported:
This theme is based on sphinx_rtd_theme_ and accepts most of the same
`configuration options`_ settable via ``html_theme_option`` and a few
additional options as well:

: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>.

:logo_only: Ignored. Inherited from sphinx_rtd_theme_. Instead, the project
name and version info will not be displayed (thus showing only the
logo) when ``subproject`` is true.

:subproject: Boolean determining if this is a subproject of the main Nextstrain
documentation project on <https://docs.nextstrain.org>. Defaults
to true.

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
6 changes: 1 addition & 5 deletions lib/nextstrain/sphinx/theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
by the theme *and also* can't refer to a theme-provided file when set by the
doc project's conf.py.

`theme_logo_only` is set via a project's conf.py -> `html_theme_options` ->
`logo_only` value (default: false). In the context of Nextstrain we use this
to determine whether or not to display the subproject name, version

We also adjust the rendering of the project name to remove the home icon.
#}
{% block sidebartitle %}
Expand All @@ -34,7 +30,7 @@
</a>
{% endif %}

{% if not theme_logo_only %}
{% if theme_subproject %}
<div class="subproject">
<a href="{{ pathto(master_doc) }}" class="project-name" alt="{{ _("Documentation Home") }}">
{{ project }}
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 @@ -8,3 +8,4 @@ pygments_style = default
style_nav_header_background = #f2f2f2
logo = True
logo_link = https://docs.nextstrain.org
subproject = True