diff --git a/data/academic.toml b/data/academic.toml index 4eced7db5..f89df22f7 100644 --- a/data/academic.toml +++ b/data/academic.toml @@ -1,3 +1,3 @@ # Academic -version = "4.2.4" +version = "4.2.5" diff --git a/layouts/partials/page_metadata.html b/layouts/partials/page_metadata.html index 223160297..7f3a353d0 100644 --- a/layouts/partials/page_metadata.html +++ b/layouts/partials/page_metadata.html @@ -1,15 +1,15 @@ {{ $is_list := .is_list }} {{ $share := .share | default false }} -{{ $ := .content }} +{{ $page := .page }} - - + +
{{/* If `authors` is set and is not empty. */}} - {{ if $.Params.authors }} - {{ $authorLen := len $.Params.authors }} + {{ if $page.Params.authors }} + {{ $authorLen := len $page.Params.authors }} {{ if gt $authorLen 0 }}
{{ partial "page_metadata_authors" $ }} @@ -17,13 +17,13 @@ {{ end }} {{ end }} - {{ if not (in (slice "talk" "page") $.Type) }} + {{ if not (in (slice "talk" "page") $page.Type) }} {{ end }} - {{ if and (eq $is_list 1) (eq $.Type "publication") }} + {{ if and (eq $is_list 1) (eq $page.Type "publication") }} - {{ if $.Params.publication_short }} - {{ $.Params.publication_short | markdownify }} - {{ else if $.Params.publication }} - {{ $.Params.publication | markdownify }} + {{ if $page.Params.publication_short }} + {{ $page.Params.publication_short | markdownify }} + {{ else if $page.Params.publication }} + {{ $page.Params.publication | markdownify }} {{ end }} {{ end }} - {{ if and (eq $.Type "post") (not (or (eq site.Params.reading_time false) (eq $.Params.reading_time false))) }} + {{ if and (eq $page.Type "post") (not (or (eq site.Params.reading_time false) (eq $page.Params.reading_time false))) }} - {{ $.ReadingTime }} {{ i18n "minute_read" }} + {{ $page.ReadingTime }} {{ i18n "minute_read" }} {{ end }} - {{ $comments_enabled := and site.DisqusShortname (not (or site.Params.disable_comments (eq $.Params.comments false))) }} + {{ $comments_enabled := and site.DisqusShortname (not (or site.Params.disable_comments (eq $page.Params.comments false))) }} {{ if and $comments_enabled (site.Params.comment_count | default true) }} - + {{ end}} - {{ if $.Params.categories }} - {{ $categoriesLen := len $.Params.categories }} + {{ if $page.Params.categories }} + {{ $categoriesLen := len $page.Params.categories }} {{ if gt $categoriesLen 0 }} - {{ range $k, $v := $.Params.categories }} + {{ range $k, $v := $page.Params.categories }} {{ . }} {{- if lt $k (sub $categoriesLen 1) -}}, {{ end }} {{ end }}