Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zwbetz-gh/cayman-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exampleSite/config.toml2
-rw-r--r--layouts/_default/terms.html3
-rw-r--r--layouts/partials/blog-post-list.html2
3 files changed, 5 insertions, 2 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 2e29834..53f24d2 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -20,7 +20,7 @@ pygmentsStyle = "pygments"
[params]
project_name = "Cayman Hugo Theme"
project_tagline = "A clean, responsive Hugo theme, ported from the original Jekyll Caymen theme"
- dateFormat = "Jan 2, 2006" # For more date formats see https://gohugo.io/functions/format/
+ dateFormat = "2006-01-02" # For more date formats see https://gohugo.io/functions/format/
footer = "Made with [Hugo](https://gohugo.io/). Themed by [Cayman](https://github.com/zwbetz-gh/cayman-hugo-theme). Deployed to [Netlify](https://www.netlify.com/)."
[menu]
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index 0cbcabf..1b805d6 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -7,8 +7,9 @@
{{ $count := .Count }}
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
<li>
+ {{ printf "(%d)" $count }}
<a href="{{ .Permalink }}">
- {{ printf "(%d) %s" $count $name }}
+ {{ $name }}
</a>
</li>
{{ end }}
diff --git a/layouts/partials/blog-post-list.html b/layouts/partials/blog-post-list.html
index bc5565d..954becf 100644
--- a/layouts/partials/blog-post-list.html
+++ b/layouts/partials/blog-post-list.html
@@ -2,6 +2,8 @@
<ul>
{{ range where .Pages.ByPublishDate.Reverse "Section" "post" }}
<li>
+ {{ $dateFormat := $.Site.Params.dateFormat | default "Jan 2, 2006" }}
+ {{ .PublishDate.Format $dateFormat }}
<a href="{{ .Permalink }}">
{{ .Title }}
</a>