mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Metadata: Improve microformats + microdata
- Wrap the <a> in a <span> to make the h-entry expose an author URL (link to homepage). Useful for sending Webmentions. - Switch from schema.org/Article to schema.org/BlogPosting
This commit is contained in:
parent
552b8c9417
commit
f2d41c1c32
3 changed files with 5 additions and 7 deletions
|
@ -11,8 +11,7 @@ Seirdy
|
|||
======
|
||||
|
||||
It me! This is the personal website for
|
||||
<a class="p-author u-url" href="https://seirdy.one" rel="home">{{% indieweb-icon %}}<span class="p-given-name">Rohan</span>
|
||||
<span class="p-family-name">Kumar</span></a>, a.k.a. <span class="p-nickname">Seirdy</span> (online handle).
|
||||
<span class="h-card p-author"><a href="https://seirdy.one" rel="author home" class="u-url url">{{% indieweb-icon %}}<span class="p-name"><span class="p-given-name">Rohan</span> <span class="p-family-name">Kumar</span></span></a>, a.k.a. <span class="p-nickname">Seirdy</span> (online handle).</span>
|
||||
|
||||
Other versions of this website
|
||||
------------------------------
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{{ define "main" }}
|
||||
<div itemscope itemtype="https://schema.org/Article" class="h-entry">
|
||||
<div itemscope itemtype="https://schema.org/BlogPosting" class="h-entry">
|
||||
<article itemprop="mainEntityOfPage">
|
||||
<header id="post-header">
|
||||
<h1 itemprop="name headline" class="p-name">{{ .Title }}</h1>
|
||||
{{ $lastmod := .Lastmod -}}
|
||||
{{ if lt .Date $lastmod -}}
|
||||
Originally posted <a class="u-url" href="https://seirdy.one{{ .RelPermalink }}"><time class="dt-published" itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time></a> by {{- partial "indieweb-author.html" -}}.<br>
|
||||
Originally posted <a class="u-url" href="https://seirdy.one{{ .RelPermalink }}"><time class="dt-published" itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time></a> by {{- partial "indieweb-author.html" -}}<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" -}}
|
||||
{{ end }}
|
||||
</header>
|
||||
<section class="e-content" itemprop="articlebody">
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<!-- re-using the indefinetly-cached favicon to avoid bloating page size -->
|
||||
{{ $favicon := resources.Get "/favicon.png" | resources.Fingerprint "md5" -}}
|
||||
<a itemprop="author" class="p-author h-card" href="https://seirdy.one" rel="author"><img class="u-photo" src="{{ $favicon.RelPermalink }}" width="16" height="16" alt="Rohan Kumar" > <span class="p-given-name">Rohan</span>
|
||||
<span class="p-family-name">Kumar</span></a>
|
||||
<span itemprop="author" class="h-card p-author"><a href="https://seirdy.one" rel="author home" class="u-url url"><img class="u-photo" src="{{ $favicon.RelPermalink }}" width="16" height="16" alt="Rohan Kumar" > <span class="p-name"><span class="p-given-name">Rohan</span> <span class="p-family-name">Kumar</span></span></a></span>
|
||||
|
|
Loading…
Reference in a new issue