Skip to content

Commit

Permalink
fixed breaking changes from 0.57
Browse files Browse the repository at this point in the history
  • Loading branch information
azmelanar committed Aug 24, 2019
1 parent 16076bc commit c25f592
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ hrefTargetBlank = true
tag = "tags"

[params]
mainSections = ["post"]
search_engine = true
#google_analytics_id = ""
twitter_username = "username"
Expand Down
4 changes: 2 additions & 2 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion layouts/tag/tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit c25f592

Please sign in to comment.