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

Add legacy microformats1/hNews metadata

This is still used by engines, reader mode implementations, etc.
This commit is contained in:
Rohan Kumar 2022-02-13 16:08:23 -08:00
parent be9bcd000d
commit f0623a7185
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
2 changed files with 7 additions and 7 deletions

View file

@ -1,17 +1,17 @@
{{ define "main" }}
<div itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting" class="h-entry">
<article itemprop="mainEntityOfPage">
<div itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
<article itemprop="mainEntityOfPage" class="h-entry hentry">
<header id="post-header">
<h1 itemprop="name headline" class="p-name">{{ .Title }}</h1>
<h1 itemprop="name headline" class="p-name entry-title">{{ .Title }}</h1>
{{ if lt .Date .Lastmod -}}
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 rel="canonical" class="u-url" href="https://seirdy.one{{ .RelPermalink }}">Website</a>
Posted <time class="dt-published 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 rel="canonical" class="u-url 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" -}} on his <a class="u-url" href="https://seirdy.one{{ .RelPermalink }}">Website</a>
Posted <time 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 rel="canonical" class="u-url 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 -}}
@ -19,7 +19,7 @@
<br>
<small><span itemprop="wordCount">{{ .WordCount }}</span> words, a <span itemprop="timeRequired" content="PT{{ .ReadingTime }}M">{{ .ReadingTime }} minute</span> read</small>
</header>
<section class="e-content" itemprop="articlebody">
<section class="e-content entry-content" itemprop="articlebody">
{{ partial "processed-content" . -}}
</section>
</article>

View file

@ -1,4 +1,4 @@
<!-- re-using the indefinetly-cached favicon to avoid bloating page size -->
{{ $favicon := resources.Get "/favicon.png" -}}
{{- $favicon_base64 := $favicon.Content | base64Encode -}}
<span itemprop="author" itemscope itemtype="https://schema.org/Person" class="h-card p-author vcard"><a itemprop="url" href="https://seirdy.one" rel="author home" class="u-url url"><img itemprop="image" class="u-photo photo" src="data:image/png;base64,{{ $favicon_base64 }}" width="16" height="16" alt="Rohan Kumar"> <span itemprop="name" class="p-name fn n"><span itemprop="givenName" class="p-given-name given-name">Rohan</span> <span itemprop="familyName" class="p-family-name family-name">Kumar</span></span></a></span>
<span itemprop="author" itemscope itemtype="https://schema.org/Person" class="h-card p-author author vcard"><a itemprop="url" href="https://seirdy.one" rel="author home" class="u-url url"><img itemprop="image" class="u-photo photo" src="data:image/png;base64,{{ $favicon_base64 }}" width="16" height="16" alt="Rohan Kumar"> <span itemprop="name" class="p-name fn n"><span itemprop="givenName" class="p-given-name given-name">Rohan</span> <span itemprop="familyName" class="p-family-name family-name">Kumar</span></span></a></span>