fix: handle no posts

This commit is contained in:
invinciblycool 2021-03-28 13:54:29 +05:30
parent 431e776004
commit 314d8cd5a4

View File

@ -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>