secluded/themes/secluded/layouts/_default/single.html

22 lines
905 B
HTML

{{ define "main" }}
<div class="wrapper">
<article>
<div class="frontmatter">
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
<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>
</div>
{{- if .Params.toc }}
<aside id="toc">
<div class="toc">
<h3 class="toc-title">Table of Contents</h3>
{{ .TableOfContents }}
</div>
</aside>
{{- end }}
<div class="content">
{{ .Content | replaceRE "(<h[1-6] id=\"(.+)\".*>)(.*)(</h[1-6]>)" `${1}${3}<a class="anchor-tag" ariaLabel="Anchor" href="#${2}"></a>${4}` | safeHTML }}
</div>
</article>
</div>
{{ end }}