2024-03-18 21:55:53 +00:00
{{- $canonicalRelPermalink := .context.RelPermalink | replaceRE "^/~seirdy/" "/" -}}
2022-05-27 01:03:28 +00:00
{{- $isNotes := false -}}
{{- $action := "Posted" -}}
2022-10-19 21:42:13 +00:00
{{- $shortMeta := false -}}
2024-03-18 21:55:53 +00:00
{{- $logURL := printf "%scontent/%s" .context.Site.Params.logUrlPrefix .context.File.Path -}}
{{- if .context.Scratch.Get "shortMeta" -}}
2022-10-19 21:42:13 +00:00
{{- $shortMeta = true -}}
{{- end -}}
2024-03-18 21:55:53 +00:00
{{- if or (eq .context.Page.Section "notes") (eq .context.Page.Title "Notes") -}}
2022-05-27 01:03:28 +00:00
{{- $isNotes = true -}}
{{- $action = "Noted" -}}
2022-05-25 00:28:32 +00:00
{{- end -}}
2024-03-18 21:55:53 +00:00
{{- $needsModTime := gt (sub .context.Lastmod.Unix .context.Date.Unix) 900 -}}
2022-10-19 21:42:13 +00:00
{{- $needsList := or (and (not $shortMeta) $needsModTime) (not $isNotes) -}}
2023-11-03 16:47:06 +00:00
{{- $gemini := "" }}
2024-03-18 21:55:53 +00:00
{{- with .context.OutputFormats.Get "gemtext" -}}
2023-11-03 16:47:06 +00:00
{{- $gemini = replace .Permalink "/gemini" "" 1 | safeURL -}}
{{- end -}}
2024-03-18 21:55:53 +00:00
{{- if not (eq .context.Page.Section "posts" ) -}}
2023-11-03 16:47:06 +00:00
{{- $gemini = replace $gemini "/index.gmi" ".gmi" | safeURL -}}
{{- end -}}
2022-10-19 21:42:13 +00:00
{{- if $needsList }}
< ul >
{{- else}}
2022-07-08 00:05:33 +00:00
< p >
2022-10-19 21:42:13 +00:00
{{- end }}
{{ if $needsList }}< li > {{ end }}
2024-04-22 04:59:01 +00:00
{{- $action }} < time { { if not ( . context . Params . evergreen ) } } itemprop = "dateCreated datePublished" class = "dt-published published" { { end } } datetime = "{{ .context.Date.UTC.Format " 2006-01-02T15:04:05Z07:00 " } } " > {{ .context.Date.UTC.Format "2006-01-02" }}< / time > by {{ partialCached "indieweb-author.html" .context -}}{{ if not .isList }} on his < a rel = "bookmark" itemprop = "url" class = "u-url url" href = "{{ .context.Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}" > Website< / a > {{- with .context.OutputFormats.Get "gemtext" -}}{{- printf " " -}}and < a rel = "syndication" class = "u-syndication" href = "{{ $gemini }}" > Gemini capsule< / a > {{ end }}{{- end -}}.
2022-10-19 21:42:13 +00:00
{{ if $needsList }}< / li > {{ end }}
2024-03-18 21:55:53 +00:00
{{- if gt (sub .context.Lastmod.Unix .context.Date.Unix) 900 -}}
2022-10-19 21:42:13 +00:00
{{ if $needsList }}< li > {{ end }}
2024-03-18 21:55:53 +00:00
Last updated < time itemprop = "dateModified" class = "dt-updated updated" datetime = "{{ .context.Lastmod.UTC.Format " 2006-01-02T15:04:05Z07:00 " } } " > {{ .context.Lastmod.UTC.Format "2006-01-02" }}< / time > .{{ if not .isList }} < a href = "{{ $logURL }}" > Changelog< / a > {{ end }}
2022-10-19 21:42:13 +00:00
{{ if $needsList }}< / li > {{ end }}
2022-06-02 04:00:19 +00:00
{{- end -}}
{{- if not $isNotes -}}
2022-10-19 21:42:13 +00:00
{{ if $needsList }}< li > {{ else }}< br / > {{ end }}
2024-03-18 21:55:53 +00:00
{{ partial "post-meta/wordcount.html" .context -}}
2022-10-19 21:42:13 +00:00
{{ if $needsList }}< / li > {{ end }}
2022-06-02 04:49:04 +00:00
{{- end -}}
2022-10-19 21:42:13 +00:00
{{- if $needsList }}
< / ul >
{{- else}}
2022-07-08 00:05:33 +00:00
< / p >
2022-10-19 21:42:13 +00:00
{{- end }}