hugo-theme-noteworthy/layouts/_default/single.html
Mikkel Hoegh 721e229177
fix for pages with no date value
About pages and similar might not have a meaningful date value, so avoid
formatting the value if not present, since that would output a
nonsensical value like “January 1, 0001”.
2020-03-08 22:33:55 +01:00

22 lines
511 B
HTML

{{ define "main" }}
<h1 class="post-title">{{ .Title }}</h1>
{{ if .Date }}
<time>{{ .Date.Format "January 2, 2006" }}</time>
{{ end }}
<div>
<p>
{{ .Content }}
</p>
</div>
{{ template "_internal/disqus.html" . }}
<div class="page-footer">
{{if .Params.tags}}
<hr class="footer-divider">
{{ range .Params.tags }}
<a class="tag" href="/tags/{{ . | urlize }}">#{{.}}</a>
{{ end }}
{{ end }}
</div>
{{end}}