2022-06-21 16:50:51 +03:00
|
|
|
{{ define "main" }}
|
2022-10-22 14:29:33 +03:00
|
|
|
<article class="post">
|
2022-06-21 16:50:51 +03:00
|
|
|
<h1 class="post-title">
|
2022-10-22 14:29:33 +03:00
|
|
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
|
|
|
</h1>
|
2022-06-21 16:50:51 +03:00
|
|
|
<div class="post-meta">
|
2022-10-22 14:29:33 +03:00
|
|
|
{{ with .Date }}
|
|
|
|
<time class="post-date">
|
|
|
|
{{ .Format "2006-01-02" }} ::
|
2022-06-21 16:50:51 +03:00
|
|
|
{{ if $.Site.Params.showLastUpdated }}
|
2022-10-22 14:29:33 +03:00
|
|
|
[{{or $.Site.Params.updatedDatePrefix "Updated"}} :: {{ .Lastmod.Format "2006-01-02" }}]
|
2022-06-21 16:50:51 +03:00
|
|
|
{{ end }}
|
2022-10-22 14:29:33 +03:00
|
|
|
</time>
|
2022-06-21 16:50:51 +03:00
|
|
|
{{ end }}
|
|
|
|
{{ with .Params.Author }}
|
2022-10-22 14:29:33 +03:00
|
|
|
<span class="post-author">{{ . }}</span>
|
2022-06-21 16:50:51 +03:00
|
|
|
{{ end }}
|
|
|
|
{{ if and (.Param "readingTime") (eq (.Param "readingTime") true) }}
|
|
|
|
<span class="post-reading-time">:: {{ .ReadingTime }} min read ({{ .WordCount }} words)</span>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{ if .Params.tags }}
|
2022-10-22 14:29:33 +03:00
|
|
|
<span class="post-tags">
|
|
|
|
{{ range .Params.tags }}
|
|
|
|
#<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>
|
|
|
|
{{ end }}
|
|
|
|
</span>
|
2022-06-21 16:50:51 +03: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 14:29:33 +03:00
|
|
|
{{ partial "posts_pagination.html" . }}
|
2022-06-21 16:50:51 +03:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ if not (.Params.hideComments | default false) }}
|
2022-10-22 14:29:33 +03:00
|
|
|
{{ partial "comments.html" . }}
|
2022-06-21 16:50:51 +03:00
|
|
|
{{ end }}
|
2022-10-22 14:29:33 +03:00
|
|
|
</article>
|
2022-06-21 16:50:51 +03:00
|
|
|
{{ end }}
|