From 05b4da4026658b4744156ea0f03e753ca84ce9f2 Mon Sep 17 00:00:00 2001 From: uvok cheetah Date: Tue, 17 Dec 2024 18:32:58 +0100 Subject: Extract navbar links --- _includes/navlinks.html | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 _includes/navlinks.html (limited to '_includes/navlinks.html') diff --git a/_includes/navlinks.html b/_includes/navlinks.html new file mode 100644 index 0000000..93dfbf6 --- /dev/null +++ b/_includes/navlinks.html @@ -0,0 +1,11 @@ + {% 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 + ^-- 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 %} -- cgit v1.2.3