From c0ff2f34f54621ee32132151cd7dc3b613728aae Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 24 Mar 2022 11:09:43 +0300 Subject: sidebar: allow hiding individual entries --- _includes/jekyll-theme/sidebar/about.html | 4 ++++ _includes/jekyll-theme/sidebar/latest-posts.html | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to '_includes') diff --git a/_includes/jekyll-theme/sidebar/about.html b/_includes/jekyll-theme/sidebar/about.html index 9806b87..8bdf204 100644 --- a/_includes/jekyll-theme/sidebar/about.html +++ b/_includes/jekyll-theme/sidebar/about.html @@ -1,3 +1,5 @@ +{% unless site.settings.sidebar.about.hide or page.sidebar.about.hide %} + {% capture about_content %} {% assign project_desc = site.settings.project.description %} {% unless project_desc %} @@ -23,3 +25,5 @@ {% endcapture %} {% include jekyll-theme/sidebar/entry.html header='About' content=about_content %} + +{% endunless %} diff --git a/_includes/jekyll-theme/sidebar/latest-posts.html b/_includes/jekyll-theme/sidebar/latest-posts.html index 513c2a6..2596569 100644 --- a/_includes/jekyll-theme/sidebar/latest-posts.html +++ b/_includes/jekyll-theme/sidebar/latest-posts.html @@ -1,3 +1,4 @@ +{% unless site.settings.sidebar.latest_posts.hide or page.sidebar.latest_posts.hide %} {% if site.posts.size > 0 %} {% capture latest_posts_content %} @@ -12,5 +13,6 @@ {% endcapture %} {% include jekyll-theme/sidebar/entry.html header='Latest posts' content=latest_posts_content %} -{% endif %} +{% endif %} +{% endunless %} -- cgit v1.2.3