1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-14 17:42:09 +00:00
seirdy.one/layouts/partials/posts.html
2023-11-29 05:52:05 -08:00

36 lines
2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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 }}">
<h3
itemprop="name headline" class="p-name entry-title">
<a href="{{ .Permalink }}" itemprop="url" class="u-url url" rel="bookmark">
{{ .Title }}
</a>
</h3>
<p>
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>
{{- if lt .Date .Lastmod -}}
, 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>
{{- end }}
</p>
<div>
<p class="p-summary entry-summary" itemprop="description">{{ .Description }}</p>
<p>{{- partial "post-meta/wordcount.html" . -}}</p>
</div>
</article>
</li>
{{- end }}
</ol>
</section>