be0ba327e3
Adds a .Site.Params.dateFormat setting to let users specify a Hugo-style date format string for content. Previously, the date format was hardcoded to "02 Jan, 2006", presumably to match the original BearBlog style. This format gets used by default if the new "dateFormat" setting is absent from the site config.
21 lines
434 B
HTML
21 lines
434 B
HTML
{{ define "main" }}
|
|
{{ if eq .Type "blog" }}{{ if not .Params.menu }}
|
|
<h1>{{ .Title }}</h1>
|
|
<p>
|
|
<i>
|
|
<time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
|
|
{{ .Date.Format (default "02 Jan, 2006" .Site.Params.dateFormat) }}
|
|
</time>
|
|
</i>
|
|
</p>
|
|
{{ end }}{{ end }}
|
|
<content>
|
|
{{ .Content }}
|
|
</content>
|
|
<p>
|
|
{{ range (.GetTerms "tags") }}
|
|
<a href="{{ .Permalink }}">#{{ .LinkTitle }}</a>
|
|
{{ end }}
|
|
</p>
|
|
{{ end }}
|