Remove paige.date.{class,hide}, paige.list.date params

master
Will Faught 2 years ago
parent b4ad5326c8
commit 9ad6a3d9a5

@ -254,19 +254,13 @@ paige:
link:
hide: false # Don't credit this project in the footer
date:
class: "text-center text-secondary"
format: ":date_long" # Hugo date format
hide: false
source: "published" # Displayed date; must be "published" or "modified"
git:
commit_url_prefix: "" # Example is "https://github.com/willfaught/paige/commit/"
list:
content:
show: false
date:
class: "mb-0 text-center text-secondary"
format: ":date_long" # Hugo date format
hide: false
date_header:
class: "h5 text-center"
hide: false

@ -11,8 +11,7 @@
{{ $authors := partial "paige/authors.html" $page }}
{{ $categories := $page.Params.categories | default slice | uniq }}
{{ $commiturl := "" }}
{{ $date := cond ($page.Param "paige.date.hide" | not) (cond (eq ($page.Param "paige.date.source" | default "published") "published") $page.PublishDate $page.Lastmod) "" }}
{{ $dateclass := $page.Param "paige.date.class" | default "paige-date text-center text-secondary" }}
{{ $date := cond (eq ($page.Param "paige.date.source" | default "published") "published") $page.PublishDate $page.Lastmod }}
{{ $dateformat := $page.Param "paige.date.format" | default ":date_long" }}
{{ $description := $page.Description | markdownify }}
{{ $nogap := "mb-0" }}
@ -59,7 +58,7 @@
{{ end }}
{{ with $date }}
<p {{ if or $dateclass $readingtime }} class="{{ if $readingtime }} {{ $nogap }} {{ end }} {{ with $dateclass }} {{ . }} {{ end }}" {{ end }}>
<p class="{{ if $readingtime }} {{ $nogap }} {{ end }} paige-date text-center text-secondary">
{{ with $commiturl }}
<a class="link-secondary text-decoration-none" href="{{ . }}">
{{ end }}

@ -26,9 +26,8 @@
{{ $authors := partial "paige/authors.html" . }}
{{ $categories := .Params.categories | default 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" }}
{{ $date := .PublishDate }}
{{ $dateformat := $page.Param "paige.date.format" | default ":date_long" }}
{{ $description := .Description | markdownify }}
{{ $draft := .Draft }}
{{ $expired := and .ExpiryDate (lt .ExpiryDate now) }}
@ -106,7 +105,7 @@
{{ end }}
{{ with $date }}
<p {{ with $dateclass }} class="{{ . }}" {{ end }}>
<p class="mb-0 paige-date text-center text-secondary">
{{ with $commiturl }}
<a class="link-secondary text-decoration-none" href="{{ . }}">
{{ end }}

Loading…
Cancel
Save