aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/index.html
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-06-25 06:05:06 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-06-25 06:05:06 +0300
commit74d943e1ef94b3e5f99c8c09d3873cedd6468b7d (patch)
tree63d7d8cec9dfb920a90f3b55cbbe699b5d26fe68 /index.html
parentstd::call_once: Markdown style fix (diff)
downloadjekyll-theme-74d943e1ef94b3e5f99c8c09d3873cedd6468b7d.tar.gz
jekyll-theme-74d943e1ef94b3e5f99c8c09d3873cedd6468b7d.zip
fix navbar links with multiple pages
I determine whether a page should be present in the navigation bar by checking if 'navbar' is present in this page's `groups`. My index.html is an example of such page. But `jekyll-paginate` creates a bunch of similar pages, each of them having 'navbar' in their `groups`. Thus, every /pageN appears in the navbar. To get rid of all of them except for the first one, I set `root_page` to `true` in index.html, and only include the first page with `root_page == true` in the navbar. Man, it's a hack if I've ever seen one.
Diffstat (limited to 'index.html')
-rw-r--r--index.html1
1 files changed, 1 insertions, 0 deletions
diff --git a/index.html b/index.html
index 66c0843..8008e91 100644
--- a/index.html
+++ b/index.html
@@ -4,6 +4,7 @@ layout: sidebar
groups:
- navbar
navbar_link: <span class="glyphicon glyphicon-home"></span>&nbsp;Main page
+root_page: true
---
{% if site.posts.size == 0 %}
<p class="h3">Sorry, no posts have been added yet.</p>