44 lines
953 B
HTML
44 lines
953 B
HTML
{{ define "main" }}
|
|
<main>
|
|
<article>
|
|
|
|
<header>
|
|
<h1 class="post-title">
|
|
{{ .Title }}
|
|
</h1>
|
|
</header>
|
|
|
|
<div class="post-meta">
|
|
{{- if .Date -}}
|
|
<time class="post-date">
|
|
{{ .Date | time.Format ":date_medium" }}
|
|
</time>
|
|
{{- end -}}
|
|
{{- with .Params.Author -}}
|
|
<span class="post-author">{{ . }}</span>
|
|
{{- end -}}
|
|
</div>
|
|
|
|
{{ if .Params.tags }}
|
|
<span class="post-tags">
|
|
{{ range .Params.tags }}
|
|
#<a href="{{ (urlize (printf "tags/%s/" . )) | absLangURL }}">
|
|
{{- . -}}
|
|
</a>
|
|
{{ end }}
|
|
</span>
|
|
{{ end }}
|
|
|
|
{{ partial "cover.html" . }}
|
|
|
|
<aside>
|
|
{{ .TableOfContents }}
|
|
</aside>
|
|
|
|
|
|
{{ .Content | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor">⌗</a> ${3}` | safeHTML }}
|
|
|
|
</article>
|
|
|
|
</main>
|
|
{{ end }}
|