8000 feat(menu): set home URL to root if SITEURL is not · Pelican-Elegant/elegant@23e0b94 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 10000 23e0b94

Browse files
committed
feat(menu): set home URL to root if SITEURL is not
This is useful when you are running site locally and have set SITEURL to empty string.
1 parent 44fa36a commit 23e0b94

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

templates/base.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,15 @@
6464
<a class="brand" href="{{ SITEURL }}/"><span class=site-name>{{ SITENAME }}</span></a>
6565
<div class="nav-collapse collapse">
6666
<ul class="nav pull-right top-menu">
67-
<li {% if page_name == 'index' %} class="active"{% endif %}><a href="{{ SITEURL }}">Home</a></li>
67+
<li {% if page_name == 'index' %} class="active"{% endif %}>
68+
<a href=
69+
{% if SITEURL %}
70+
{{ SITEURL }}
71+
{% else %}
72+
"/"
73+
{% endif %}
74+
>Home</a>
75+
</li>
6876
{% if DISPLAY_PAGES_ON_MENU %}
6977
{% for p in pages %}
7078
<li {% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>

0 commit comments

Comments
 (0)
0