24 lines
1.0 KiB
HTML
24 lines
1.0 KiB
HTML
|
{{ define "main" }}
|
||
|
<div class="wrapper">
|
||
|
<article>
|
||
|
<div class="frontmatter">
|
||
|
<h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||
|
{{- if .GitInfo }}
|
||
|
<p><strong>Last edited:</strong> <a href="{{ .Site.Params.gitUrl -}}{{ .GitInfo.Hash }}" target="_blank" rel="noopener">{{ if .Site.Params.dateformNum }}{{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local }}{{ else }}{{ dateFormat "2006-01-02" .GitInfo.AuthorDate.Local }}{{ end }}</a></p>
|
||
|
{{- end }}
|
||
|
</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 }}
|