diff --git a/README.md b/README.md index 13f05a2a..118c035b 100644 --- a/README.md +++ b/README.md @@ -274,6 +274,9 @@ paige: description: class: "lead text-center" # Default is "lead text-center" hide: false # Default is false + reading_time: + class: "text-center text-secondary" # Default is "text-center text-secondary" + show: false # Default is false title: class: "display-5 fw-bold text-center" # Default is "display-5 fw-bold text-center" hide: false # Default is false @@ -291,6 +294,9 @@ paige: description: class: "text-center" # Default is "text-center" hide: false # Default is false + reading_time: + class: "text-center text-secondary" # Default is "text-center text-secondary" + show: false # Default is false summary: class: "text-center" # Default is "text-center" show: false # Default is false diff --git a/i18n/en.yaml b/i18n/en.yaml index 18ad88d0..50eabe4a 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -1,6 +1,10 @@ paige_figure: other: Figure +paige_minutes: + one: minute + other: minutes + paige_noscript: other: JavaScript is required. diff --git a/layouts/partials/paige/about.html b/layouts/partials/paige/about.html index 7cfe708c..924f051a 100644 --- a/layouts/partials/paige/about.html +++ b/layouts/partials/paige/about.html @@ -5,12 +5,17 @@ {{ $gap := "mb-0" }} {{ $date := cond ($page.Param "paige.page.date.hide" | not) $page.PublishDate "" }} {{ $dateclass := $page.Param "paige.page.date.class" | default "text-center text-secondary" }} +{{ $readingtime := $page.Param "paige.page.reading_time.show" }} +{{ $readingtimeclass := $page.Param "paige.page.reading_time.class" | default "text-center text-secondary" }} {{ with $authors }} -

{{ . }}

+

{{ . }}

{{ end }} {{ with $date }} -

+

{{ end }} +{{ if $readingtime }} +

{{ $page.ReadingTime }} {{ i18n "paige_minutes" $page.ReadingTime }}

+{{ end }} diff --git a/layouts/partials/paige/pages.html b/layouts/partials/paige/pages.html index 915f60a1..863bd253 100644 --- a/layouts/partials/paige/pages.html +++ b/layouts/partials/paige/pages.html @@ -34,6 +34,8 @@ {{ $descriptionclass := $page.Param "paige.page_list.description.class" | default $class }} {{ $flags := slice }} {{ $gap := "mb-0" }} + {{ $readingtime := $page.Param "paige.page_list.reading_time.show" }} + {{ $readingtimeclass := $page.Param "paige.page_list.reading_time.class" | default "text-center text-secondary" }} {{ $summary := cond ($page.Param "paige.page_list.summary.show" | not) "" (.Summary | strings.TrimPrefix "

" | strings.TrimSuffix "

") }} {{ $summaryclass := $page.Param "paige.page_list.summary.class" | default $class }} {{ $title := cond ($page.Param "paige.page_list.title.hide" | not) (.Title | markdownify) "" }} @@ -57,20 +59,23 @@ {{ $flags = delimit ($flags | sort | uniq) " " }} -

+

{{ $title | markdownify }}

{{ with $description }} -

{{ . }}

+

{{ . }}

{{ end }} {{ with $authors }} -

{{ . }}

+

{{ . }}

{{ end }} {{ if $date }} -

+

{{ end }} + {{ if $readingtime }} +

{{ .ReadingTime }} {{ i18n "paige_minutes" .ReadingTime }}

+ {{ end }} {{ if $summary }}

{{ $summary }}

{{ end }}