mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-12-25 02:02:11 +00:00
938428333e
Statically grab and include webmentions during Hugo builds, no JS involved. Hugo supports making web requests and parsing the resulting JSON, so there was no need to use an external program either.
17 lines
568 B
HTML
17 lines
568 B
HTML
{{ if eq .RelPermalink "/posts.html" -}}
|
|
<h1>Posts</h1>
|
|
{{ else -}}
|
|
<h2>Posts</h2>
|
|
{{ 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>
|
|
<ul class="unstyled-list">
|
|
{{- range where site.RegularPages "Type" "in" site.Params.mainSections }}
|
|
<li>
|
|
<time datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>
|
|
<br>
|
|
<a href="{{ .Permalink }}">
|
|
{{ .Title }}
|
|
</a>
|
|
</li>
|
|
{{- end }}
|
|
</ul>
|