aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/_includes
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-04-09 19:55:32 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-04-09 19:55:32 +0300
commit78b543203d6f0c7d670432d17d38f493b4473c5a (patch)
treeedcdf3507ae35b6e1f6a5cf00e25550fcb0a54b1 /_includes
parentnavbar: simpler & more robust (diff)
downloadjekyll-theme-78b543203d6f0c7d670432d17d38f493b4473c5a.tar.gz
jekyll-theme-78b543203d6f0c7d670432d17d38f493b4473c5a.zip
navbar: describe the workarounds
Diffstat (limited to '')
-rw-r--r--_includes/common/navbar.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/_includes/common/navbar.html b/_includes/common/navbar.html
index a255619..9f01639 100644
--- a/_includes/common/navbar.html
+++ b/_includes/common/navbar.html
@@ -13,6 +13,16 @@
<ul class="nav navbar-nav">
{% assign page_list = site.pages | where_exp: "x","x.navbar_link" | sort: "navbar_priority" %}
{% for node in page_list %}
+ {% comment %}
+ Whether a page should be present in the navbar is determined by
+ the presense of navbar_link in the page's front matter. It can be
+ true, in which case page's title is used, or it can be custom HTML.
+
+ If the page is paginated, it should be marked as such by setting
+ navbar_paginated to true in its front matter. That way, /pageN/
+ pages, which would have the same navbar_link, wouldn't appear in
+ the navbar.
+ {% endcomment %}
{% if node.navbar_paginated %}
{% if navbar_has_paginated %}
{% continue %}