diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-03-24 11:09:43 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-03-24 11:09:43 +0300 |
commit | c0ff2f34f54621ee32132151cd7dc3b613728aae (patch) | |
tree | d2433d914676815fcdcdea4b993849d734f6fa25 /_includes | |
parent | move sidebar entries to separate includes (diff) | |
download | jekyll-theme-c0ff2f34f54621ee32132151cd7dc3b613728aae.tar.gz jekyll-theme-c0ff2f34f54621ee32132151cd7dc3b613728aae.zip |
sidebar: allow hiding individual entries
Diffstat (limited to '')
-rw-r--r-- | _includes/jekyll-theme/sidebar/about.html | 4 | ||||
-rw-r--r-- | _includes/jekyll-theme/sidebar/latest-posts.html | 4 |
2 files changed, 7 insertions, 1 deletions
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 %} |