Skip to content

Commit 0c03560

Browse files
committed
Check if link is url
1 parent 75d40f6 commit 0c03560

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

pydata_sphinx_theme/docs-navbar.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@
33

44

55
{% if logo %}
6-
{% if theme_logo_doc %}
7-
<a class="navbar-brand" href="{{ pathto(theme_logo_doc) }}">
6+
{% if not theme_logo_link %}
7+
<a class="navbar-brand" href="{{ pathto(master_doc) }}">
88
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="logo">
99
</a>
10-
{% else %}
11-
<a class="navbar-brand" href="{{ pathto(master_doc) }}">
10+
{% elif theme_logo_link[:4] == 'http' %}
11+
<a class="navbar-brand" href="{{ theme_logo_link }}">
1212
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="logo">
1313
</a>
14+
{% else %}
15+
<a class="navbar-brand" href="{{ pathto(theme_logo_link) }}">
16+
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="logo">
17+
</a>
1418
{% endif %}
1519
{% endif %}
1620
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-menu" aria-controls="navbar-menu" aria-expanded="false" aria-label="Toggle navigation">

pydata_sphinx_theme/theme.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ sidebarwidth = 270
77
sidebar_includehidden = True
88
use_edit_page_button = False
99
external_links =
10+
logo_link =
1011
github_url =
1112
twitter_url =
12-
logo_doc =
1313
google_analytics_id =
1414
show_prev_next = True
1515
search_bar_text = Search the docs ...

0 commit comments

Comments
 (0)