diff options
author | Dmytro Slupytskyi <dslupytskyi@gmail.com> | 2019-08-24 13:19:38 +0300 |
---|---|---|
committer | Dmytro Slupytskyi <dslupytskyi@gmail.com> | 2019-08-24 13:19:38 +0300 |
commit | c25f5926822563d937b9df95be482fc5ed779b7c (patch) | |
tree | 708697ca17136f989b6af85790231577a38a415f | |
parent | 16076bc07e6c53bde79e78d2e9478752f85c250b (diff) |
fixed breaking changes from 0.57
-rw-r--r-- | exampleSite/config.toml | 1 | ||||
-rw-r--r-- | layouts/index.html | 4 | ||||
-rw-r--r-- | layouts/rss.xml | 2 | ||||
-rw-r--r-- | layouts/tag/tag.html | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 4b3cb57..49bea1e 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -31,6 +31,7 @@ hrefTargetBlank = true tag = "tags" [params] + mainSections = ["post"] search_engine = true #google_analytics_id = "" twitter_username = "username" diff --git a/layouts/index.html b/layouts/index.html index 2ce33ec..dc27fd5 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -9,7 +9,7 @@ <div class="home"> <div class="posts"> {{ if isset .Site.Params "paginate" }} - {{ $paginator := .Paginate (where .Data.Pages "Type" "post") }} + {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) .Site.Params.paginate }} {{ range $paginator.Pages.ByDate.Reverse }} {{ .Render "summary" }} {{ end }} @@ -20,7 +20,7 @@ <!-- {{ template "_internal/pagination.html" . }} --> </div> {{ else }} - {{ range first 10 .Data.Pages.ByDate.Reverse }} + {{ range first 10 .Site.RegularPages.ByDate.Reverse }} {{ if eq .Type "post" }} {{ .Render "summary"}} {{ end }} diff --git a/layouts/rss.xml b/layouts/rss.xml index c31f3f4..7a23524 100644 --- a/layouts/rss.xml +++ b/layouts/rss.xml @@ -7,7 +7,7 @@ {{ with .Site.Author.name }}<author>{{.}}</author>{{end}} {{ with .Site.Copyright }}<copyright>{{.}}</copyright>{{end}} <updated>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 MST" }}</updated> - {{ range first 15 .Data.Pages }} + {{ range first 15 .Site.RegularPages }} <item> <title>{{ .Title }}</title> <link>{{ .Permalink }}</link> diff --git a/layouts/tag/tag.html b/layouts/tag/tag.html index c712226..a1c58d8 100644 --- a/layouts/tag/tag.html +++ b/layouts/tag/tag.html @@ -5,7 +5,7 @@ <div class="measure"> <p>Tag: {{ .Title | lower }}</p> <ul> - {{ range .Data.Pages.ByDate.Reverse }} + {{ range .Site.RegularPages.ByDate.Reverse }} <li><a href="{{ .Permalink}}"> {{ .LinkTitle }} </a></li> {{ end }} </ul> |