From cb3ed425c8ccf92518a2348251a4d5cb4c7b93a0 Mon Sep 17 00:00:00 2001
From: Philipp Oppermann
Date: Mon, 25 Apr 2016 23:42:51 +0200
Subject: [PATCH] Display only posts on front page and start category
separation
---
layouts/index.html | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/layouts/index.html b/layouts/index.html
index 32df65a5..569eb3af 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -7,13 +7,17 @@
you like. The source code is also available in the corresponding
Github repository.
-Latest post: {{ range first 1 .Site.Pages }}
+
Latest post: {{ range first 1 (where .Site.Pages "Section" "post") }}
{{ .Title }}
{{ end }}
- {{ range .Site.Pages.ByDate }}
+ {{ range first 4 (where .Site.Pages.ByDate "Section" "post") }}
+ {{ .Render "teaser" }}
+ {{ end }}
+
+ {{ range first 4 (after 4 (where .Site.Pages.ByDate "Section" "post")) }}
{{ .Render "teaser" }}
{{ end }}