From 0928ac7868816f52541d07a2a66a4038c54de344 Mon Sep 17 00:00:00 2001 From: digitalcraftsman Date: Fri, 19 May 2017 22:18:32 +0200 Subject: Use mainSections to define which pages are shown on the homepage --- exampleSite/config.toml | 3 +++ layouts/partials/article_list.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 86a7fdd..ee11f32 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -28,6 +28,9 @@ themesDir = "../.." logo = "css/images/logo.png" disable_mathjax = false # set to true to disable MathJax + # define which types of pages should be shown. By default the type with the most regular pages + mainSections = ["post"] + # Format dates with Go's time formatting date_format = "2006-01-02" diff --git a/layouts/partials/article_list.html b/layouts/partials/article_list.html index af28570..5e42ee5 100644 --- a/layouts/partials/article_list.html +++ b/layouts/partials/article_list.html @@ -1,5 +1,5 @@
- {{ $paginator := .Paginate (where .Site.RegularPages "Type" "post") }} + {{ $paginator := .Paginate (where .Site.Pages "Section" "in" .Site.Params.mainSections) }} {{ range $paginator.Pages }}
-- cgit v1.2.3