2022-06-21 13:50:51 +00:00
|
|
|
{{ define "main" }}
|
2022-10-22 11:29:33 +00:00
|
|
|
<article class="post">
|
2022-06-21 13:50:51 +00:00
|
|
|
<h1 class="post-title">
|
2022-10-22 11:29:33 +00:00
|
|
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
|
|
|
</h1>
|
2022-06-21 13:50:51 +00:00
|
|
|
<div class="post-meta">
|
2022-10-24 14:31:41 +00:00
|
|
|
{{ if .Date }}
|
2022-10-22 11:29:33 +00:00
|
|
|
<time class="post-date">
|
2023-04-30 13:44:59 +00:00
|
|
|
{{ .Date.Format "2006-01-02" }}
|
2022-06-21 13:50:51 +00:00
|
|
|
{{ if $.Site.Params.showLastUpdated }}
|
2023-04-30 13:44:59 +00:00
|
|
|
:: [{{or $.Site.Params.updatedDatePrefix "Updated"}} :: {{ .Lastmod.Format "2006-01-02" }}]
|
2022-06-21 13:50:51 +00:00
|
|
|
{{ end }}
|
2022-10-22 11:29:33 +00:00
|
|
|
</time>
|
2022-06-21 13:50:51 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ with .Params.Author }}
|
2023-04-30 13:44:59 +00:00
|
|
|
<span class="post-author"> :: {{ . }}</span>
|
2022-06-21 13:50:51 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ if and (.Param "readingTime") (eq (.Param "readingTime") true) }}
|
2023-01-18 15:51:20 +00:00
|
|
|
<span class="post-reading-time">:: {{ .ReadingTime }} {{ $.Site.Params.minuteReadingTime | default "min read" }} ({{ .WordCount }} {{ $.Site.Params.words | default "words" }})</span>
|
2022-06-21 13:50:51 +00:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{ if .Params.tags }}
|
2022-10-22 11:29:33 +00:00
|
|
|
<span class="post-tags">
|
|
|
|
{{ range .Params.tags }}
|
|
|
|
#<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>
|
|
|
|
{{ end }}
|
|
|
|
</span>
|
2022-06-21 13:50:51 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ partial "cover.html" . }}
|
|
|
|
|
|
|
|
{{ if (.Params.Toc | default .Site.Params.Toc) }}
|
|
|
|
<div class="table-of-contents">
|
|
|
|
<h2>
|
|
|
|
{{ (.Params.TocTitle | default .Site.Params.TocTitle) | default "Table of Contents" }}
|
|
|
|
</h2>
|
|
|
|
{{ .TableOfContents }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
<div class="post-content">
|
|
|
|
{{- with .Content -}}
|
|
|
|
<div>
|
|
|
|
{{ . | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor">⌗</a> ${3}` | safeHTML }}
|
|
|
|
</div>
|
|
|
|
{{- end -}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{ if eq .Type $.Site.Params.contentTypeName }}
|
2022-10-22 11:29:33 +00:00
|
|
|
{{ partial "posts_pagination.html" . }}
|
2022-06-21 13:50:51 +00:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ if not (.Params.hideComments | default false) }}
|
2022-10-22 11:29:33 +00:00
|
|
|
{{ partial "comments.html" . }}
|
2022-06-21 13:50:51 +00:00
|
|
|
{{ end }}
|
2022-10-22 11:29:33 +00:00
|
|
|
</article>
|
2022-06-21 13:50:51 +00:00
|
|
|
{{ end }}
|