From 91ffd0f5e380ee84083b1375bf0b6128a3fc98f7 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Fri, 14 Feb 2025 16:39:49 -0800 Subject: [PATCH] Refactor noisy vars into exps --- layouts/_default/list.atom.xml | 4 +--- layouts/_default/list.rss.xml | 4 +--- layouts/partials/paige/site-header.html | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/layouts/_default/list.atom.xml b/layouts/_default/list.atom.xml index 361889e9..192ece30 100644 --- a/layouts/_default/list.atom.xml +++ b/layouts/_default/list.atom.xml @@ -104,9 +104,7 @@ {{ end }} {{ range $subpages }} - {{ $include := not (.Param "paige.exclude_feeds") }} - - {{ if $include }} + {{ if not (.Param "paige.exclude_feeds") }} {{ $content := .Content }} {{ $external := and .Params.link (not (.Param "paige.feeds.disable_link")) | not | not }} diff --git a/layouts/_default/list.rss.xml b/layouts/_default/list.rss.xml index 2076e4a3..6977ede9 100644 --- a/layouts/_default/list.rss.xml +++ b/layouts/_default/list.rss.xml @@ -92,9 +92,7 @@ {{ end }} {{ range $subpages }} - {{ $include := not (.Param "paige.exclude_feeds") }} - - {{ if $include }} + {{ if not (.Param "paige.exclude_feeds") }} {{ $author := "" }} {{ $authors := partial "paige/func-authors.html" . }} diff --git a/layouts/partials/paige/site-header.html b/layouts/partials/paige/site-header.html index 5e811dfc..a625a345 100644 --- a/layouts/partials/paige/site-header.html +++ b/layouts/partials/paige/site-header.html @@ -13,8 +13,6 @@ {{ $title := site.Title | markdownify | and ($page.Param "paige.site.disable_title" | not) }} {{ $underline := false }} -{{ $header := or $breadcrumbs $description $first $last $menu $title }} - {{ if eq $basePath "/" }} {{ $basePath = "" }} {{ end }} @@ -35,7 +33,7 @@ {{ $links = true }} {{ end }} -{{ if $header }} +{{ if or $breadcrumbs $description $first $last $menu $title }}
{{ partial "paige/func-include.html" (dict "name" "site-header-first%s.html" "page" $page) }}