diff --git a/layouts/partials/sidebar-for-tiny-theme/sidebar.html b/layouts/partials/sidebar-for-tiny-theme/sidebar.html index 70ac4e8..69c1d8d 100644 --- a/layouts/partials/sidebar-for-tiny-theme/sidebar.html +++ b/layouts/partials/sidebar-for-tiny-theme/sidebar.html @@ -1,4 +1,8 @@ -{{ if .IsHome -}} +{{ $isPost := eq .Page.Type "post" -}} +{{ $showOnPosts := $.Site.Params.sidebar_show_on_posts -}} +{{ $showOnPages := $.Site.Params.sidebar_show_on_pages -}} +{{ $shouldShowSidebar := or .IsHome (and $showOnPosts $isPost) (and $showOnPages (not $isPost)) -}} +{{ if $shouldShowSidebar -}}