mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 08:12:11 +00:00
Revamp post list
- Include updated date and descriptions - Schema: make the post list a DataFeed of BlogPostings - Make each post an <article>
This commit is contained in:
parent
10cb71855f
commit
8412aa3633
1 changed files with 12 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
||||||
<div class="h-feed hfeed" itemscope itemtype="https://schema.org/Collection">
|
<div class="h-feed hfeed" itemscope itemtype="https://schema.org/DataFeed">
|
||||||
{{ if eq .RelPermalink "/posts.html" -}}
|
{{ if eq .RelPermalink "/posts.html" -}}
|
||||||
<h1 class="p-name" itemprop="name headline">Posts</h1>
|
<h1 class="p-name" itemprop="name headline">Posts</h1>
|
||||||
{{ else -}}
|
{{ else -}}
|
||||||
|
@ -7,14 +7,17 @@
|
||||||
<p><em>Timestamp format: <code>YYYY-MM-DD</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite> and <cite><a href="https://xkcd.com/1179/">ISO 8601</a></cite></em></p>
|
<p><em>Timestamp format: <code>YYYY-MM-DD</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite> and <cite><a href="https://xkcd.com/1179/">ISO 8601</a></cite></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 class="h-entry hentry" itemscope itemtype="https://schema.org/BlogPosting">
|
<li>
|
||||||
<time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>
|
<article class="h-entry hentry" itemprop="dataFeedElement" itemscope itemtype="https://schema.org/BlogPosting https://schema.org/DataFeedItem">
|
||||||
<br>
|
<h3 itemprop="name headline" class="p-name entry-title">
|
||||||
<span itemprop="name headline" class="p-name entry-title">
|
<a href="{{ .Permalink }}" itemprop="url" class="u-url url" rel="bookmark">
|
||||||
<a href="{{ .Permalink }}" itemprop="url" class="u-url url">
|
{{ .Title -}}
|
||||||
{{ .Title }}
|
</a>
|
||||||
</a>
|
</h3>
|
||||||
</span>
|
Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>, updated
|
||||||
|
<time itemprop="dateModified" class="dt-updated updated" datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>
|
||||||
|
<p class="p-summary entry-summary" itemprop="https://schema.org/description">{{ .Description }}</p>
|
||||||
|
</article>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
Loading…
Reference in a new issue