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

github.com/invinciblycool/lekh.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinvinciblycool <jprrahultiwari@gmail.com>2021-03-28 11:24:29 +0300
committerinvinciblycool <jprrahultiwari@gmail.com>2021-03-28 11:24:29 +0300
commitdc836bde5226f184ee77974fe5db8c4703211de5 (patch)
treebd173ed6ad604f5d84f6c19445c190852ce7cc2a
parentadb19bd8e32202b1d784691c9e906a7839ca2282 (diff)
fix: handle no posts
-rw-r--r--layouts/index.html2
1 files changed, 2 insertions, 0 deletions
diff --git a/layouts/index.html b/layouts/index.html
index 914005d..8bf8ffe 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -31,6 +31,7 @@
<div>
<!-- orders content according to the "publishdate" field in front matter -->
+ {{ with .Site.Data.personalize.PostLimit }}
{{ range first .Site.Data.personalize.PostLimit .Pages.ByPublishDate }}
<div>
<a href="{{ .Permalink }}">{{ .Title }}</a><br />
@@ -38,6 +39,7 @@
</div>
<br />
{{ end }}
+ {{ end }}
<h3><a href="posts/">View all posts</a></h3>