Skip to content

Commit c7afa11

Browse files
committed
navbar: skip pages with no title
We seem to get a bogus empty bullet in the navbar due to "style.css" being listed. I have a feeling there's a more elegant fix here (like filtering out things that aren't "real" pages from the site.pages list). But as a workaround, let's just skip anything with no title. That's sane to do anyway, even for real pages. Oddly, this bug doesn't seem to replicate on my local "jekyll serve", but it is present on the published site.
1 parent aa4cbae commit c7afa11

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 %}
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)