diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | layouts/index.html | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -30,6 +30,7 @@ You could add `params` into your site's `config.toml` file: Content = false # takes true or false # if both are set to true, summary is shown. # FooterMsg = "Copyright Me 2016. Powered by Hugo." + mainSections = ["post"] ``` if you use `config.yaml`, it could look like: @@ -45,6 +46,7 @@ params: Content: false # takes true or false # if both are set to true, summary is shown # FooterMsg: "Custom footer message. Powered by Hugo." + mainSections: ["post"] ``` ### Enable Disqus to your post diff --git a/layouts/index.html b/layouts/index.html index 91bdc41..2e82058 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -10,7 +10,7 @@ {{ partial "header.html" . }} <div class="content"> <div class="posts"> - {{ $paginator := .Paginate (where .Data.Pages "Type" "post") }} {{ range $paginator.Pages }} + {{ $paginator := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) }} {{ range $paginator.Pages }} <div class="post"> <h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2> <span class="post-date">{{ .Date.Format "Jan 2, 2006" }}</span> |