mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2025-02-25 15:50:05 +00:00
Add Open Graph metas for article posted/mod times
This commit is contained in:
parent
76efbb8479
commit
e8179a38b9
2 changed files with 7 additions and 3 deletions
|
@ -57,5 +57,10 @@
|
||||||
<meta property="og:image:width" content="1200">
|
<meta property="og:image:width" content="1200">
|
||||||
<meta property="og:url" content="https://seirdy.one{{ .RelPermalink }}">
|
<meta property="og:url" content="https://seirdy.one{{ .RelPermalink }}">
|
||||||
<meta property="og:description" content="{{ if .Params.description }}{{ .Params.description }}{{ else }}{{ .Site.Params.Description }}{{ end }}">
|
<meta property="og:description" content="{{ if .Params.description }}{{ .Params.description }}{{ else }}{{ .Site.Params.Description }}{{ end }}">
|
||||||
|
<meta property="article:author" content="{{ .Site.Author.name }}">
|
||||||
|
<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
|
||||||
|
{{ if lt .Date .Lastmod -}}
|
||||||
|
<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">
|
||||||
|
{{ end -}}
|
||||||
{{ hugo.Generator }}
|
{{ hugo.Generator }}
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -3,14 +3,13 @@
|
||||||
<article itemprop="mainEntityOfPage">
|
<article itemprop="mainEntityOfPage">
|
||||||
<header id="post-header">
|
<header id="post-header">
|
||||||
<h1 itemprop="name headline" class="p-name">{{ .Title }}</h1>
|
<h1 itemprop="name headline" class="p-name">{{ .Title }}</h1>
|
||||||
{{ $lastmod := .Lastmod -}}
|
{{ if lt .Date .Lastmod -}}
|
||||||
{{ 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 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" }}
|
{{- with .OutputFormats.Get "gemtext" }}
|
||||||
and <a rel="syndication" class="u-syndication" href="{{replace .Permalink "/gemini" "" 1 | safeURL}}">Gemini capsule</a>
|
and <a rel="syndication" class="u-syndication" href="{{replace .Permalink "/gemini" "" 1 | safeURL}}">Gemini capsule</a>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<br>
|
<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>
|
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 -}}
|
{{ 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 <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" }}
|
{{- with .OutputFormats.Get "gemtext" }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue