Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Fix the logo link for reference
Browse files Browse the repository at this point in the history
  • Loading branch information
kwankyu committed Jul 31, 2022
1 parent f19b597 commit 09d5f5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/doc/common/templates/sidebar/brand.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This is a sidebar brand html modified from Furo's default theme/furo/sidebar/brand.html

-#}
<a class="sidebar-brand{% if logo %} centered{% endif %}" href="{{ documentation_root }}">
<a class="sidebar-brand{% if logo %} centered{% endif %}" href="{% if refsub %}{{ reference_root }}{% else %}{{ documentation_root }}{% endif %}">
{% block brand_content %}
{%- if logo_url %}
<div class="sidebar-logo-container">
Expand All @@ -17,7 +17,7 @@
</div>
{%- endif %}
{% if not theme_sidebar_hide_name %}
<span class="sidebar-brand-text">{{ documentation_title }}</span>
<span class="sidebar-brand-text">{% if refsub %}{{ reference_title }}{% else %}{{ documentation_title }}{% endif %}</span>
{%- endif %}
{% endblock brand_content %}
</a>
4 changes: 1 addition & 3 deletions src/sage_docbuild/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,15 +639,13 @@ def add_page_context(app, pagename, templatename, context, doctree):
context['title'] = 'Documentation'
context['website'] = True
context['documentation_root'] = 'index.html'

if 'reference' in path1 and not path1.endswith('reference'):
path2 = os.path.join(SAGE_DOC, 'html', 'en', 'reference')
relpath = os.path.relpath(path2, path1)
context['reference_title'] = 'Reference Manual'
context['reference_title'] = 'Sage {}'.format(release) + ' Reference Manual'
context['reference_root'] = os.path.join(relpath, 'index.html')
context['refsub'] = True


dangling_debug = False

def debug_inf(app, message):
Expand Down

0 comments on commit 09d5f5c

Please sign in to comment.