mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Add structured data to posts list
Mark-up the posts list as an h-feed made of smaller posts.
This commit is contained in:
parent
1f5142524b
commit
bef816e959
1 changed files with 20 additions and 16 deletions
|
@ -1,17 +1,21 @@
|
||||||
|
<div class="h-feed hfeed" itemscope itemtype="https://schema.org/Collection">
|
||||||
{{ if eq .RelPermalink "/posts.html" -}}
|
{{ if eq .RelPermalink "/posts.html" -}}
|
||||||
<h1>Posts</h1>
|
<h1 class="p-name" itemprop="name headline">Posts</h1>
|
||||||
{{ else -}}
|
{{ else -}}
|
||||||
<h2>Posts</h2>
|
<h2 class="p-name" itemprop="name headline">Posts</h2>
|
||||||
{{ end -}}
|
{{ 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>
|
<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">
|
<ul class="unstyled-list">
|
||||||
{{- range where site.RegularPages "Type" "in" site.Params.mainSections }}
|
{{- range where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||||
<li>
|
<li class="h-entry hentry" itemscope itemtype="https://schema.org/BlogPosting">
|
||||||
<time datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>
|
<time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>
|
||||||
<br>
|
<br>
|
||||||
<a href="{{ .Permalink }}">
|
<span itemprop="name headline" class="p-name entry-title">
|
||||||
|
<a href="{{ .Permalink }}" itemprop="url" class="u-url url">
|
||||||
{{ .Title }}
|
{{ .Title }}
|
||||||
</a>
|
</a>
|
||||||
|
</span>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue