hugo-theme-minima/layouts/_default/single.html
2021-10-29 16:58:33 +08:00

47 lines
No EOL
1 KiB
HTML

{{ define "main" }}
{{ if .Params.toc }}
{{ partial "toc.html" . }}
{{ end }}
<h1 class="mt-8 mb-6">{{ .Title }}</h1>
<div class="mb-3 text-xs flex justify-between sm:flex-col">
<div>
{{ if .Site.Params.displayDate }}
Posted at &mdash; {{ dateFormat .Site.Params.timeformat .Date }}
{{ end }}
{{ if .Draft }}
<span class="ml-3 tag">
DRAFT
</span>
{{ end }}
</div>
{{ if .Params.tags }}
<div class="sm:mt-4">
{{ range .Params.tags }}
<a class="not-first:ml-3" href="/tags/{{ . }}">#{{ . }}</a>
{{ end }}
</div>
{{ end }}
</div>
<main>
<p>{{ .Description | markdownify | safeHTML }}</p>
<article class="md">
{{ .Content }}
</article>
</main>
{{ if or .Params.math .Site.Params.math }}
{{ partial "math.html" . }}
{{ end }}
{{ if or .Params.mermaid .Site.Params.mermaid }}
{{ partial "mermaid.html" . }}
{{ end }}
{{ if and .Params.comment (eq .Site.Params.comment "disqus")}}
{{ partial "disqus.html" . }}
{{ end }}
{{ if and .Params.comment (eq .Site.Params.comment "ovo")}}
{{ partial "ovo.html" . }}
{{ end }}
{{ end }}