From b87f98a261b052c1d8c08101549c897490f523ea Mon Sep 17 00:00:00 2001 From: uvok cheetah Date: Thu, 9 Jan 2020 18:54:31 +0100 Subject: Fix order + generation of page links --- _includes/header.html | 17 ++++++----------- contact.html | 1 + poem.md | 1 + 3 files changed, 8 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 %} {{ my_page.title | escape }} {% endif %} {% endfor %} - diff --git a/contact.html b/contact.html index 2acc24a..8663a3b 100644 --- a/contact.html +++ b/contact.html @@ -2,6 +2,7 @@ layout: page title: Kontakt in_navbar: true +order: 100 ---
diff --git a/poem.md b/poem.md index bba58ab..1cb958e 100644 --- a/poem.md +++ b/poem.md @@ -2,6 +2,7 @@ layout: page title: Gedicht in_navbar: true +order: 50 --- > Uvok my name -- cgit v1.2.3