summaryrefslogtreecommitdiff
path: root/_includes/header.html
diff options
context:
space:
mode:
authoruvok cheetah2020-01-09 18:54:31 +0100
committeruvok cheetah2020-01-09 19:02:10 +0100
commitb87f98a261b052c1d8c08101549c897490f523ea (patch)
tree9014b6304ef41cc498e0a7267b22b11ecbc4379b /_includes/header.html
parent633ea5dbad65d9398250b0fbcf107b4c71374896 (diff)
Fix order + generation of page links
Diffstat (limited to '_includes/header.html')
-rw-r--r--_includes/header.html17
1 files changed, 6 insertions, 11 deletions
diff --git a/_includes/header.html b/_includes/header.html
index dd6294d..ec9473c 100644
--- a/_includes/header.html
+++ b/_includes/header.html
@@ -17,20 +17,15 @@
{% comment %}
my_page.autogen is populated by the pagination logic for all pages
that are automatically created by the gem. Check for non-existence to exclude pagination pages from site.pages iterators
-
-
- add exclusion of /index to avoid having the link twice
-
-{# check for in_navbar: true #}
- {% endcomment %}
-
- {% for my_page in site.pages %}
-
- {% if my_page.title and my_page.autogen == nil and my_page.url != "/index.html" %}
+ ^-- alt: check for content
+ add exclusion of /index to avoid having the link twice
+ {% endcomment %}
+ {% assign spag = site.pages | sort: "order" %}
+ {% for my_page in spag %}
+ {% if my_page.title and my_page.content and my_page.url != "/index.html" and my_page.in_navbar %}
<a class="page-link" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
{% endif %}
{% endfor %}
-
</div>
</nav>
</div>