diff options
author | Angelo <AIRyndon@users.noreply.github.com> | 2020-12-24 11:31:47 +0300 |
---|---|---|
committer | Angelo <AIRyndon@users.noreply.github.com> | 2020-12-24 11:31:47 +0300 |
commit | 630c4c6b48344901eef91d6153cba5cae5a2a15a (patch) | |
tree | 26cf835dc21011a9bd31ca29a22c5ecfff30e55d /layouts/blog | |
parent | 6925c0248cf70674576d42d173ff33b00a3d522a (diff) |
add archive format to all posts
Diffstat (limited to 'layouts/blog')
-rw-r--r-- | layouts/blog/list.html | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/layouts/blog/list.html b/layouts/blog/list.html index 95085c5..d3aea07 100644 --- a/layouts/blog/list.html +++ b/layouts/blog/list.html @@ -5,24 +5,27 @@ <div class="container"> {{ if .Site.Params.home.showLatest | default true }} <h2 class="title is-2 top-pad">{{ i18n "index_blog_latestPosts" . }}</h2> - {{ range first 1 .Pages.ByPublishDate.Reverse }} - <div class="summary">{{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}{{ end }} - <h3 class="title is-3 strong-post-title"> - <a href="{{ .Permalink }}"> - {{ .Title | markdownify }} - </a> - </h3> - <div class="markdown"> - {{ .Summary }} - {{ if .Truncated }} - <a href="{{ .Permalink }}">{{ i18n "index_blog_readMore" . }}</a> - {{ end }} + {{ range first 1 .Pages.ByPublishDate.Reverse }} + <div class="summary">{{ if .Params.date }}{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}{{ end }} + <h3 class="title is-3 strong-post-title"> + <a href="{{ .Permalink }}"> + {{ .Title | markdownify }} + </a> + </h3> + <div class="markdown"> + {{ .Summary }} + {{ if .Truncated }} + <a href="{{ .Permalink }}">{{ i18n "index_blog_readMore" . }}</a> + {{ end }} + </div> </div> - </div> - {{ end }} - + {{ end }} {{ end }} <h2 class="title is-2 top-pad">{{ i18n "index_blog_allPosts" . }}</h2> - {{ partialCached "blog/li.html" . }} + {{if .Site.Params.home.allPostsArchiveFormat}} + {{ partialCached "blog/archive.html" .}} + {{else}} + {{ partialCached "blog/li.html" . }} + {{end}} </div> {{ end }} |