hugo-theme-flat/layouts/_default/single.html

50 lines
1.1 KiB
HTML
Raw Normal View History

2022-04-27 13:54:00 +00:00
{{ 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>
2022-04-27 13:54:00 +00:00
{{ end }}
</div>
{{ end }}
{{ with .Params.tags }}
<div>
Tags:
{{ range . }}
<a href="{{ "/tags/" | relURL }}{{ . | urlize }}">{{ . }}</a>
2022-04-27 13:54:00 +00:00
{{ end }}
</div>
{{ end }}
</div>
<hr />
<div class="content">
{{ .Content }}
</div>
{{ if in .Site.Params.mainSections .Type }}
<hr />
{{ partial "comment.html" . }}
{{ end }}
</section>
{{ end }}