From 625fb13e122d1642b2a5c6760f28212550aaa7a5 Mon Sep 17 00:00:00 2001 From: jeffreytse Date: Tue, 25 Aug 2020 14:25:00 +0800 Subject: [PATCH] feat: add hidden front-matter for post layout --- _layouts/post.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/_layouts/post.html b/_layouts/post.html index bd1f93d..ed045ec 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -13,12 +13,15 @@ sidebar: {%- include functions.html func='get_value' -%} {%- assign banner = return -%} - {%- if banner == nil -%} + {%- assign result = page.hidden | where_exp: "item", "item == 'header'" -%} + {%- if banner == nil and result.size == 0 -%} {%- include views/post-header.html -%} {%- endif -%} {%- include views/article.html -%} + {%- assign result = page.hidden | where_exp: "item", "item == 'navigator'" -%} + {%- if result.size == 0 -%}
{%- if page.previous -%}