1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-12-21 00:22:10 +00:00
seirdy.one/layouts/partials/posts.html

37 lines
2 KiB
HTML
Raw Normal View History

<section class="h-feed hfeed" itemprop="hasPart" itemscope="" itemtype="https://schema.org/DataFeed">
<h2 class="p-name" itemprop="name" id="articles">Articles</h2>
<p>Heres a selection of my best articles, in featured order. To see the rest, visit <a href="posts/">my Articles page</a>.</p>
<p>I edit some of these articles quite often; some are updated indefinitely. Check the “updated” timestamps.</p>
<p role="doc-tip">
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>. Sorted newest to oldest.
</p>
<ol>
{{- $posts := site.RegularPages -}}
{{- $posts = sort (where $posts "Params.featured" ">" 0) "Params.featured" -}}
{{- range $posts -}}
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" -}}
<li itemprop="dataFeedElement" itemscope="" itemtype="https://schema.org/DataFeedItem">
<article class="h-entry hentry" itemprop="item" itemscope="" itemtype="https://schema.org/BlogPosting" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
2022-04-25 15:54:42 +00:00
<h3
itemprop="name headline" class="p-name entry-title">
<a href="{{ .Permalink }}" itemprop="url" class="u-url url" rel="bookmark">
{{ .Title }}
</a>
</h3>
2022-06-09 00:40:19 +00:00
<p>
Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>
{{- if lt .Date .Lastmod -}}
, updated <time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>
{{- end }}
</p>
<div>
2022-03-08 06:44:45 +00:00
<p class="p-summary entry-summary" itemprop="description">{{ .Description }}</p>
<p>{{- partial "wordcount.html" . -}}</p>
</div>
</article>
</li>
{{- end }}
2022-04-05 04:40:36 +00:00
</ol>
2022-03-08 06:44:45 +00:00
</section>