1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-19 20:02:10 +00:00

Fix post header

- Make post header show syndicated gemini copy even if the article
  hasn't been updated
- Reduce verbosity of the first line (date, author)
This commit is contained in:
Rohan Kumar 2021-01-30 16:11:18 -08:00
parent 0caabb4e44
commit e3d360e4c3
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -5,14 +5,17 @@
<h1 itemprop="name headline" class="p-name">{{ .Title }}</h1>
{{ $lastmod := .Lastmod -}}
{{ if lt .Date $lastmod -}}
Originally posted <time class="dt-published" itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time> by {{- partial "indieweb-author.html" -}} on his <a class="u-url" href="https://seirdy.one{{ .RelPermalink }}">website</a>
Posted <time class="dt-published" itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time> by {{- partial "indieweb-author.html" -}} on his <a class="u-url" href="https://seirdy.one{{ .RelPermalink }}">Website</a>
{{- with .OutputFormats.Get "gemtext" }}
and <a rel="syndication" class="u-syndication" href="{{replace .Permalink "/gemini" "" 1 | safeURL}}">Gemini capsule</a>
{{- end -}}
<br>
Last updated <time itemprop="dateModified" class="dt-updated" datetime="{{ $lastmod.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>. <a href="{{ .Site.Params.logUrlPrefix }}content/{{ .File.Path }}">Changelog</a>
{{ else -}}
Posted <a class="u-url" href="https://seirdy.one{{ .RelPermalink }}"><time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time></a> by {{- partial "indieweb-author.html" -}}
Posted <a class="u-url" href="https://seirdy.one{{ .RelPermalink }}"><time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time></a> by {{- partial "indieweb-author.html" -}} on his <a class="u-url" href="https://seirdy.one{{ .RelPermalink }}">Website</a>
{{- with .OutputFormats.Get "gemtext" }}
and <a rel="syndication" class="u-syndication" href="{{replace .Permalink "/gemini" "" 1 | safeURL}}">Gemini capsule</a>
{{- end -}}
{{ end }}
</header>
<section class="e-content" itemprop="articlebody">