Skip to content

Commit

Permalink
Merge pull request #238 from jdknight/fallback-to-prj-name-for-sideba…
Browse files Browse the repository at this point in the history
…r-titles

fallback to project name branding/title for singlehtml
  • Loading branch information
pradyunsg authored Sep 28, 2021
2 parents eeb597f + 2e4d1f3 commit 5527d43
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/furo/theme/furo/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@

{#- Site title -#}
{%- block htmltitle -%}
{% if pagename == master_doc %}
{% if not docstitle %}
<title>{{ title|striptags|e }}</title>
{% elif pagename == master_doc %}
<title>{{ docstitle|striptags|e }}</title>
{% else %}
<title>{{ title|striptags|e }} - {{ docstitle|striptags|e }}</title>
Expand Down
2 changes: 1 addition & 1 deletion src/furo/theme/furo/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</label>
</div>
<div class="header-center">
<a href="{{ pathto(master_doc) }}"><div class="brand">{{ docstitle }}</div></a>
<a href="{{ pathto(master_doc) }}"><div class="brand">{{ docstitle if docstitle else project }}</div></a>
</div>
<div class="header-right">
<div class="theme-toggle-container theme-toggle-header">
Expand Down
2 changes: 1 addition & 1 deletion src/furo/theme/furo/sidebar/brand.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</div>
{%- endif %}
{% if not theme_sidebar_hide_name %}
<span class="sidebar-brand-text">{{ docstitle }}</span>
<span class="sidebar-brand-text">{{ docstitle if docstitle else project }}</span>
{%- endif %}
{% endblock brand_content %}
</a>

0 comments on commit 5527d43

Please sign in to comment.