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

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>
2023-11-29 13:52:05 +00:00
Posted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.UTC.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.UTC.Format "2006-01-02" }}</time>
2022-06-09 00:40:19 +00:00
{{- if lt .Date .Lastmod -}}
2023-11-29 13:52:05 +00:00
, updated <time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.UTC.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.UTC.Format "2006-01-02" }}</time>
2022-06-09 00:40:19 +00:00
{{- end }}
</p>
<div>
2022-03-08 06:44:45 +00:00
<p class="p-summary entry-summary" itemprop="description">{{ .Description }}</p>
<p>{{- partial "post-meta/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>