Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
talha131 committed Jun 30, 2019
1 parent 44fa36a commit 23e0b94
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion templates/base.html
Expand Up @@ -64,7 +64,15 @@
<a class="brand" href="{{ SITEURL }}/"><span class=site-name>{{ SITENAME }}</span></a>
<div class="nav-collapse collapse">
<ul class="nav pull-right top-menu">
<li {% if page_name == 'index' %} class="active"{% endif %}><a href="{{ SITEURL }}">Home</a></li>
<li {% if page_name == 'index' %} class="active"{% endif %}>
<a href=
{% if SITEURL %}
{{ SITEURL }}
{% else %}
"/"
{% endif %}
>Home</a>
</li>
{% if DISPLAY_PAGES_ON_MENU %}
{% for p in pages %}
<li {% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
Expand Down

0 comments on commit 23e0b94

Please sign in to comment.