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

github.com/themefisher/meghna-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordivinerites <divinerites@gmail.com>2020-03-04 09:22:50 +0300
committerGitHub <noreply@github.com>2020-03-04 09:22:50 +0300
commit1c57d9724b7de979014e53ebf57a88e90f46af59 (patch)
treec6af571653cbe4242f6bc20003cbf017c06554aa /layouts
parent8c96a0fd5b49cb75d7f8d6a2d63bc30665061413 (diff)
Correct a problem when using less than 3 blog article
In this case, the author is (badly) displayed. This patch hard limits blog posts to blog section.
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/blog.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/blog.html b/layouts/partials/blog.html
index 8fd8a7c..07a727e 100644
--- a/layouts/partials/blog.html
+++ b/layouts/partials/blog.html
@@ -13,7 +13,7 @@
</div>
{{"<!-- /section title -->" | safeHTML}}
- {{ range first 3 .Site.RegularPages }}
+ {{ range first 3 (where .Site.RegularPages "Section" "==" "blog")}}
{{ .Render "article"}}
{{ end }}
@@ -25,4 +25,4 @@
</div>
</section>
{{"<!-- /blog -->" | safeHTML}}
-{{ end }} \ No newline at end of file
+{{ end }}