{{ .Title }}
{{- if not .Params.disableMeta -}} - {{- partial "post-meta/post-meta.html" . -}} + {{- partial "post-meta/post-meta.html" (dict "context" . "isList" false) -}} {{- end -}}diff --git a/layouts/partials/post-meta/post-meta.html b/layouts/partials/post-meta/post-meta.html index d729554..328cdc4 100644 --- a/layouts/partials/post-meta/post-meta.html +++ b/layouts/partials/post-meta/post-meta.html @@ -1,22 +1,22 @@ -{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" -}} +{{- $canonicalRelPermalink := .context.RelPermalink | replaceRE "^/~seirdy/" "/" -}} {{- $isNotes := false -}} {{- $action := "Posted" -}} {{- $shortMeta := false -}} -{{- $logURL := printf "%scontent/%s" .Site.Params.logUrlPrefix .File.Path -}} -{{- if .Scratch.Get "shortMeta" -}} +{{- $logURL := printf "%scontent/%s" .context.Site.Params.logUrlPrefix .context.File.Path -}} +{{- if .context.Scratch.Get "shortMeta" -}} {{- $shortMeta = true -}} {{- end -}} -{{- if or (eq .Page.Section "notes") (eq .Page.Title "Notes") -}} +{{- if or (eq .context.Page.Section "notes") (eq .context.Page.Title "Notes") -}} {{- $isNotes = true -}} {{- $action = "Noted" -}} {{- end -}} -{{- $needsModTime := gt (sub .Lastmod.Unix .Date.Unix) 900 -}} +{{- $needsModTime := gt (sub .context.Lastmod.Unix .context.Date.Unix) 900 -}} {{- $needsList := or (and (not $shortMeta) $needsModTime) (not $isNotes) -}} {{- $gemini := "" }} -{{- with .OutputFormats.Get "gemtext" -}} +{{- with .context.OutputFormats.Get "gemtext" -}} {{- $gemini = replace .Permalink "/gemini" "" 1 | safeURL -}} {{- end -}} -{{- if not (eq .Page.Section "posts" ) -}} +{{- if not (eq .context.Page.Section "posts" ) -}} {{- $gemini = replace $gemini "/index.gmi" ".gmi" | safeURL -}} {{- end -}} {{- if $needsList }} @@ -25,16 +25,16 @@
{{- end }} {{ if $needsList }}
{{ end }} - {{ partial "post-meta/wordcount.html" . -}} + {{ partial "post-meta/wordcount.html" .context -}} {{ if $needsList }}