Skip to content

Commit 545b8fc

Browse files
committed
navbar: reject entries with nil titles rather than empty
The blank entry in the navbar was supposed to be fixed by c7afa11, but it didn't work. This is presumably because the title there is nil, not the empty string (but I can't reproduce locally, so I'm just guessing). Let's switch out the empty-string test for a "truthy" one (technically we could do both, but if the only way to get an empty string is by explicitly saying "title: " in the front matter, it doesn't seem likely to happen).
1 parent 1e8d932 commit 545b8fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_includes/navbar.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<li><a href="/">Home</a>
44
<li><a href="/about">About</a>
55
{% for node in site.pages reversed %}
6-
{% if node.navbar != false and node.title != "" %}
6+
{% if node.navbar != false and node.title %}
77
<li><a href="{{node.url}}">{{node.title}}</a>
88
{% endif %}
99
{% endfor %}

0 commit comments

Comments
 (0)