1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-19 20:02:10 +00:00
seirdy.one/layouts/partials/posts.html
Rohan Kumar bef816e959
Add structured data to posts list
Mark-up the posts list as an h-feed made of smaller posts.
2022-02-15 21:42:58 -08:00

21 lines
989 B
HTML

<div class="h-feed hfeed" itemscope itemtype="https://schema.org/Collection">
{{ if eq .RelPermalink "/posts.html" -}}
<h1 class="p-name" itemprop="name headline">Posts</h1>
{{ else -}}
<h2 class="p-name" itemprop="name headline">Posts</h2>
{{ end -}}
<p><em>Timestamp format: <code>YYYY-MM-DD</code>, as per <a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a> and <a href="https://xkcd.com/1179/">ISO 8601</a></em></p>
<ul class="unstyled-list">
{{- range where site.RegularPages "Type" "in" site.Params.mainSections }}
<li class="h-entry hentry" itemscope itemtype="https://schema.org/BlogPosting">
<time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>
<br>
<span itemprop="name headline" class="p-name entry-title">
<a href="{{ .Permalink }}" itemprop="url" class="u-url url">
{{ .Title }}
</a>
</span>
</li>
{{- end }}
</ul>
</div>