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

github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanzei <hanzei@mailbox.org>2018-06-27 03:33:38 +0300
committerHanzei <hanzei@mailbox.org>2018-06-27 03:33:38 +0300
commitada193209735746bfe19b8d842a8776bbfa3de44 (patch)
tree77b3aefdebb052bf925068f1000cb67b7539b62a /layouts/blog
parent389a69a6e71228b536af28776156fda30d22e217 (diff)
Code cleanup
Diffstat (limited to 'layouts/blog')
-rw-r--r--layouts/blog/list.html9
1 files changed, 3 insertions, 6 deletions
diff --git a/layouts/blog/list.html b/layouts/blog/list.html
index 876975b..9c162f7 100644
--- a/layouts/blog/list.html
+++ b/layouts/blog/list.html
@@ -11,14 +11,13 @@
<div class="section no-padding {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }}">
{{ partial "nav.html" . }}
<div class="container markdown {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }} top-pad">
- <!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
{{ .Content }}
</div>
<!-- Begin Blog container -->
<div class="container">
{{ if .Site.Params.showLatest }}
<h2 class="title is-2 top-pad">{{ i18n "index_blog_latestPosts" . }}</h2>
- {{ range first 1 (where .Data.Pages.ByPublishDate.Reverse "Section" "blog") }}
+ {{ range first 1 .Pages.ByPublishDate.Reverse }}
<div class="summary">{{ .Date.Format (.Site.Params.dateForm | default "Jan 02, 2006") }}
<h3 class="title is-3 strong-post-title">
<a href="{{ .RelPermalink }}">
@@ -36,10 +35,8 @@
{{ end }}
<h2 class="title is-2 top-pad">{{ i18n "index_blog_allPosts" . }}</h2>
<ul>
- {{ range .Data.Pages.ByPublishDate }}
- {{ if eq .Section "blog" }}
- {{ partial "li.html" . }}
- {{ end }}
+ {{ range .Pages.ByPublishDate.Reverse }}
+ {{ partial "li.html" . }}
{{ end }}
</ul>
</div>