hugo-theme-flat/layouts/_default/single.html
leafee98 e2ca0c5332 toggle comments at front matter
Whether the comment show up was determined by if the page is under
mainSection, now it's determined by front matter and config.toml
2022-05-18 21:27:06 +08:00

49 lines
1.1 KiB
HTML

{{ define "main" }}
<section class="single">
<h1 class="title">{{ .Title }}</h1>
<div class="tip">
<time datetime="{{ .PublishDate }}">{{ .PublishDate.Format "2006/01/02" }}</time>
<span class="split">·</span>
<span> {{ .WordCount }} words </span>
<span class="split">·</span>
<span>
{{ .ReadingTime }} minutes to read
</span>
</div>
<div class="taxonomies">
{{ with .Params.categories }}
<div>
Categories:
{{ range . }}
<a href="{{ "/categories/" | relURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
</div>
{{ end }}
{{ with .Params.tags }}
<div>
Tags:
{{ range . }}
<a href="{{ "/tags/" | relURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
</div>
{{ end }}
</div>
<hr />
<div class="content">
{{ .Content }}
</div>
{{ with and .Site.Params.remark42 .Params.show_comments }}
<hr />
{{ partial "comment.html" . }}
{{ end }}
</section>
{{ end }}