diff --git a/layouts/partials/paige/metadata.html b/layouts/partials/paige/metadata.html index 935a20a5..9adeedd9 100644 --- a/layouts/partials/paige/metadata.html +++ b/layouts/partials/paige/metadata.html @@ -3,11 +3,14 @@ {{ $authors := cond ($page.Param "paige.main.metadata.authors.hide" | not) (partial "paige/func-authors.html" $page) "" }} {{ $authorsclass := $page.Param "paige.main.metadata.authors.class" | default "paige-authors text-center text-secondary" }} {{ $categories := cond ($page.Param "paige.main.metadata.terms.hide" | not) ($page.Params.categories | default slice) slice | uniq }} +{{ $commiturl := "" }} {{ $date := cond ($page.Param "paige.main.metadata.date.hide" | not) $page.PublishDate "" }} {{ $dateclass := $page.Param "paige.main.metadata.date.class" | default "paige-date text-center text-secondary" }} {{ $dateformat := $page.Param "paige.main.metadata.date.format" | default ":date_long" }} {{ $description := cond ($page.Param "paige.main.metadata.description.hide" | not) ($page.Description | markdownify) "" }} {{ $descriptionclass := $page.Param "paige.main.metadata.description.class" | default "lead paige-description text-center" }} +{{ $lastmod := cond (eq $date $page.Lastmod) "" $page.Lastmod }} +{{ $lastmodshow := and $lastmod ($page.Param "paige.main.metadata.date.lastmod.hide" | not) }} {{ $nogap := "mb-0" }} {{ $readingtime := cond ($page.Param "paige.main.metadata.reading_time.hide" | not) $page.ReadingTime "" }} {{ $readingtimeclass := $page.Param "paige.main.metadata.reading_time.class" | default "paige-reading-time text-center text-secondary" }} @@ -20,10 +23,6 @@ {{ $titlelink := $page.Params.link }} {{ $titlepage := $page.RelPermalink }} -{{ $commiturl := "" }} -{{ $lastmod := cond (eq $date $page.Lastmod) "" $page.Lastmod }} -{{ $lastmodshow := and $lastmod ($page.Param "paige.main.metadata.date.lastmod.hide" | not) }} - {{ if and ($page.Param "paige.main.metadata.git.commit_url_prefix") $page.GitInfo }} {{ $commiturl = print ($page.Param "paige.main.metadata.git.commit_url_prefix") $page.GitInfo.Hash }} {{ end }} diff --git a/layouts/partials/paige/pages.html b/layouts/partials/paige/pages.html index 686afa17..5f64aa05 100644 --- a/layouts/partials/paige/pages.html +++ b/layouts/partials/paige/pages.html @@ -27,6 +27,7 @@ {{ $authors := cond ($page.Param "paige.list.authors.hide" | not) (partial "paige/func-authors.html" .) "" }} {{ $authorsclass := $page.Param "paige.list.authors.class" | default "mb-0 paige-authors text-center text-secondary" }} {{ $categories := cond ($page.Param "paige.list.terms.hide" | not) (.Params.categories | default slice) slice | uniq }} + {{ $commiturl := "" }} {{ $date := cond ($page.Param "paige.list.date.hide" | not) .PublishDate "" }} {{ $dateclass := $page.Param "paige.list.date.class" | default "mb-0 paige-date text-center text-secondary" }} {{ $dateformat := $page.Param "paige.list.date.format" | default ":date_long" }} @@ -51,10 +52,6 @@ {{ $titleclass := $page.Param "paige.list.title.class" | default "mb-0 paige-title text-center" }} {{ $titlelink := .RelPermalink }} - {{ $commiturl := "" }} - {{ $lastmod := cond (eq $date $page.Lastmod) "" $page.Lastmod }} - {{ $lastmodshow := and $lastmod ($page.Param "paige.main.metadata.date.lastmod.hide" | not) }} - {{ if and ($page.Param "paige.main.metadata.git.commit_url_prefix") $page.GitInfo }} {{ $commiturl = print ($page.Param "paige.main.metadata.git.commit_url_prefix") $page.GitInfo.Hash }} {{ end }}