Skip to content

Commit

Permalink
feat: add logo_only theme option
Browse files Browse the repository at this point in the history
  • Loading branch information
ogiorgis committed Jun 29, 2021
1 parent 2f64af1 commit 4df1535
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ html_favicon = "path/to/favicon.ico"
These will be placed in the top-left of your page.


You can avoid the display of the project name at the top of the sidebar (below the logo) by adding this line in `conf.py`:

```python
logo_only = True
```

## Control the depth of the left sidebar lists to expand

You can control the level of toc items in the left sidebar to remain expanded,
Expand Down
2 changes: 1 addition & 1 deletion sphinx_book_theme/_templates/sidebar-logo.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% if logo %}
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="logo">
{% endif %}
{% if docstitle %}
{% if docstitle and not theme_logo_only %}
<h1 class="site-logo" id="site-title">{{ docstitle }}</h1>
{% endif %}
</a>
Expand Down
1 change: 1 addition & 0 deletions sphinx_book_theme/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ repository_url =
repository_branch =
launch_buttons = {}
home_page_in_toc = False
logo_only =
navbar_footer_text =
extra_navbar = Theme by the <a href="https://ebp.jupyterbook.org">Executable Book Project</a>
extra_footer =
Expand Down

0 comments on commit 4df1535

Please sign in to comment.