single.html

 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 style="view-transition-name: post-meta-{{ .Title | urlize }}"><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.tags }}
 9            <p class="tags">
10                {{ $title := .Title }}
11                {{- range (.GetTerms "tags") }}
12                <a class="button" href="{{.Permalink}}" style="view-transition-name: post-tags-{{ $title | urlize }}{{ .Title | urlize }}">{{.Title}}</a>
13                {{- end }}
14            </p>
15            {{- end }}
16            {{- if .Params.rss_only }}
17            <aside class="admonition note">
18                <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>
19            </aside>
20            {{- end }}
21        </div>
22        {{- if .Params.toc }}
23        <aside id="toc">
24            <div class="toc">
25                <h3 class="toc-title">Table of Contents</h3>
26                {{ .TableOfContents }}
27            </div>
28        </aside>
29        {{- end }}
30        <div class="content">
31            {{ .Content | replaceRE "(<h[1-6] id=\"(.+)\".*>)(.*)(</h[1-6]>)" `${1}${3} <a class="anchor-tag" ariaLabel="Anchor" href="#${2}"></a>${4}` | safeHTML }}
32        </div>
33        <hr/>
34        <div class="content"><p>This is a self-hosted <a href="https://commento.io/">Commento</a> server that integrates with <a href="https://akismet.com/">Akismet</a> for spam filtration. Comments that make it through are still subject to moderator (me) approval before they're displayed publicly.</p></div>
35        <script defer src="https://commento.secluded.site/js/commento.js"></script>
36        <div id="commento"></div>
37        <hr/>
38    </article>
39</div>
40{{ end }}