mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-25 01:26:31 -05:00
Set default value of DateFormat param #50
This commit is contained in:
parent
e902efea9d
commit
404716b9e5
3 changed files with 6 additions and 4 deletions
|
@ -19,8 +19,8 @@ hasCJKLanguage = true
|
||||||
Profiles, backgrounds, favorite things etc.
|
Profiles, backgrounds, favorite things etc.
|
||||||
"""
|
"""
|
||||||
publicationYear = "2019"
|
publicationYear = "2019"
|
||||||
listPageDateFormat = "January, 2006" # See https://gohugo.io/functions/format/
|
# listPageDateFormat = "January, 2006" # See https://gohugo.io/functions/format/
|
||||||
singlePageDateFormat = "January 2, 2006"
|
# singlePageDateFormat = "January 2, 2006"
|
||||||
# custom_css = ["/css/custom.css"]
|
# custom_css = ["/css/custom.css"]
|
||||||
# custom_js = ["/js/custom.js"]
|
# custom_js = ["/js/custom.js"]
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
<div id="searchResults"></div>
|
<div id="searchResults"></div>
|
||||||
<!-- contents -->
|
<!-- contents -->
|
||||||
<div id="contentsList">
|
<div id="contentsList">
|
||||||
{{ range $index, $value := .Pages.GroupByDate .Site.Params.listPageDateFormat }}
|
{{ $listPageDateFormat := .Site.Params.listPageDateFormat | default "January, 2006"}}
|
||||||
|
{{ range $index, $value := .Pages.GroupByDate $listPageDateFormat }}
|
||||||
{{ if (ne $index 0) }}
|
{{ if (ne $index 0) }}
|
||||||
<hr class="separator">
|
<hr class="separator">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
{{ partial "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
<!-- date -->
|
<!-- date -->
|
||||||
<p class="date">{{ .Date.Format .Site.Params.singlePageDateFormat }}</p>
|
{{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}}
|
||||||
|
<p class="date">{{ .Date.Format $singlePageDateFormat }}</p>
|
||||||
<!-- content -->
|
<!-- content -->
|
||||||
<div id="contentBody">
|
<div id="contentBody">
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|
Loading…
Reference in a new issue