Use .Site.Pages in the documentation examples instead of .Site.Recent

This commit is contained in:
Gustav Näslund 2015-11-30 20:52:30 +01:00 committed by Anthony Fok
parent d7ef272a23
commit b0b6a8c7ac
2 changed files with 3 additions and 3 deletions

View file

@ -161,7 +161,7 @@ e.g.
<ul>
{{ $page_link := .Permalink }}
{{ $tags := .Params.tags }}
{{ range .Site.Recent }}
{{ range .Site.Pages }}
{{ $page := . }}
{{ $has_common_tags := intersect $tags .Params.tags | len | lt 0 }}
{{ if and $has_common_tags (ne $page_link $page.Permalink) }}
@ -259,7 +259,7 @@ e.g.
series: golang
+++
{{ range where .Site.Recent "Params.series" "golang" }}
{{ range where .Site.Pages "Params.series" "golang" }}
{{ .Content }}
{{ end }}

View file

@ -382,7 +382,7 @@ so, such as in this example:
```
<nav class="recent">
<h1>Recent Posts</h1>
<ul>{{range first .Site.Params.SidebarRecentLimit .Site.Recent}}
<ul>{{range first .Site.Params.SidebarRecentLimit .Site.Pages}}
<li><a href="{{.RelPermalink}}">{{.Title}}</a></li>
{{end}}</ul>
</nav>