1{{ define "main" }}
2<div class="wrapper">
3 <article>
4 <div class="frontmatter">
5 <h1 class="post-title" style="view-transition-name: post-title-{{ .Title | urlize }}"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
6 <p><strong>Reading Time:</strong> {{ .ReadingTime }} minutes | <strong>Published:</strong> {{ dateFormat "2006-01-02" .Date }} | <strong>Last Edited:</strong> {{ dateFormat "2006-01-02" .Lastmod }}</a></p>
7 <p><strong>Download this post as:</strong> <a href="{{ .Permalink | replaceRE "^[^/]+://[^/]+/(.*)/$" "$1" }}.pdf">PDF,</a> <a href="{{ .Permalink | replaceRE "^[^/]+://[^/]+/(.*)/$" "$1" }}.epub">EPUB,</a> or <a href="{{ .Permalink | replaceRE "^[^/]+://[^/]+/(.*)/$" "$1" }}.txt">plaintext</a></p>
8 {{- if .Params.rss_only }}
9 <aside class="admonition note">
10 <p><strong>Note:</strong> this is an RSS-only post; it's exclusively publicised through <a href="/posts/index.xml">my RSS feed.</a> Read about <a href="https://daverupert.com/2018/01/welcome-to-rss-club/">RSS Club</a> for more information.</p>
11 </aside>
12 {{- end }}
13 </div>
14 {{- if .Params.toc }}
15 <aside id="toc">
16 <div class="toc">
17 <h3 class="toc-title">Table of Contents</h3>
18 {{ .TableOfContents }}
19 </div>
20 </aside>
21 {{- end }}
22 <div class="content">
23 {{ .Content | replaceRE "(<h[1-6] id=\"(.+)\".*>)(.*)(</h[1-6]>)" `${1}${3} <a class="anchor-tag" ariaLabel="Anchor" href="#${2}">¶</a>${4}` | safeHTML }}
24 </div>
25 <hr/>
26 <div class="content"><p>I'm experimenting with comments for a couple of months. This is a self-hosted <a href="https://commento.io/">Commento</a> server, so none of the information entered here goes through any third parties, just my own systems.</p></div>
27 <script defer src="https://commento.secluded.site/js/commento.js"></script>
28 <div id="commento"></div>
29 <hr/>
30 </article>
31</div>
32{{ end }}