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            {{- if .Params.tags }}
 8            <p class="tags">
 9                {{ $title := .Title }}
10                {{- range (.GetTerms "tags") }}
11                <a class="button" href="{{.Permalink}}" style="view-transition-name: post-tags-{{ $title | urlize }}{{ .Title | urlize }}">{{.Title}}</a>
12                {{- end }}
13            </p>
14            {{- end }}
15            {{- if .Params.rss_only }}
16            <aside class="admonition note">
17                <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>
18            </aside>
19            {{- end }}
20        </div>
21        {{- if .Params.toc }}
22        <aside id="toc">
23            <div class="toc">
24                <h3 class="toc-title">Table of Contents</h3>
25                {{ .TableOfContents }}
26            </div>
27        </aside>
28        {{- end }}
29        <div class="content">
30            {{ .Content | replaceRE "(<h[1-6] id=\"(.+)\".*>)(.*)(</h[1-6]>)" `${1}${3} <a class="anchor-tag" ariaLabel="Anchor" href="#${2}"></a>${4}` | safeHTML }}
31        </div>
32        <hr/>
33        <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>
34        <script defer src="https://commento.secluded.site/js/commento.js"></script>
35        <div id="commento"></div>
36        <hr/>
37    </article>
38</div>
39{{ end }}