Renamed microhook and sidebar widgets

This commit is contained in:
Leon Mika 2025-02-07 07:13:53 +11:00
parent df3c3285d6
commit fb170b6b40
4 changed files with 1 additions and 1 deletions

View file

@ -0,0 +1,13 @@
{{ $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 -}}
<div class="sidebar">
{{ if templates.Exists "partials/sidebar.html" }}
{{ partial "sidebar.html" . }}
{{ else }}
{{ partial "sidebar-widgets/recommendations.html" . }}
{{ end }}
</div>
{{ end -}}