diff options
author | zwbetz <zwbetz@gmail.com> | 2019-04-02 00:07:25 +0300 |
---|---|---|
committer | zwbetz <zwbetz@gmail.com> | 2019-04-02 00:07:25 +0300 |
commit | 1280f8c54dbfadf41a40d8cfcf9172606aac6ce8 (patch) | |
tree | 5510c7fd0518d0dd32557889ce0a5f8d4f2b15be | |
parent | 74c449589548566c0313f1b4ef0d1d83bf41ee6c (diff) |
Tweak posts and terms layouts
-rw-r--r-- | exampleSite/config.toml | 2 | ||||
-rw-r--r-- | layouts/_default/terms.html | 3 | ||||
-rw-r--r-- | layouts/partials/blog-post-list.html | 2 |
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>
|