mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-27 14:12:09 +00:00
1aed7a66d4
The site now has polygot markup and can handle both XHTML5 and HTML5 parsing rules. My staging site will be XHTML but my main site will be HTML5, just in case of parse errors. If other tools (e.g. LightHouse) end up supporting XHTML5, I'll consider switching the content-type to XHTML.
20 lines
1.4 KiB
HTML
20 lines
1.4 KiB
HTML
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" -}}
|
|
{{- $isNotes := false -}}
|
|
{{- $action := "Posted" -}}
|
|
{{- $logURL := printf "%scontent/%s" .Site.Params.logUrlPrefix .File.Path -}}
|
|
{{- if or (eq .Page.Section "notes") (eq .Page.Title "Notes") -}}
|
|
{{- $isNotes = true -}}
|
|
{{- $action = "Noted" -}}
|
|
{{- else -}}
|
|
{{- $logURL = $logURL | strings.ReplaceRE `\.md` `.gmi` -}}
|
|
{{- end -}}
|
|
{{- $action }} <time{{ if not (.Params.evergreen) }} itemprop="dateCreated datePublished" class="dt-published published"{{ end }} datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>
|
|
by {{- partial "indieweb-author.html" -}} on his <a rel="canonical" itemprop="mainEntityOfPage url" class="u-url url" href="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">Website</a>{{- with .OutputFormats.Get "gemtext" -}}{{- printf " " -}}and <a rel="syndication" class="u-syndication" href="{{replace .Permalink "/gemini" "" 1 | safeURL}}">Gemini capsule</a>{{- end -}}.
|
|
{{ if gt (sub .Lastmod.Unix .Date.Unix) 3600 -}}
|
|
<br />
|
|
Last updated <time itemprop="dateModified" class="dt-updated updated" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>. <a href="{{ $logURL }}">Changelog</a>.
|
|
{{- end }}
|
|
{{ if not $isNotes -}}
|
|
<br />
|
|
{{ partial "wordcount.html" . -}}
|
|
{{ end }}
|