mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Use .Site.Pages in the documentation examples instead of .Site.Recent
This commit is contained in:
parent
d7ef272a23
commit
b0b6a8c7ac
2 changed files with 3 additions and 3 deletions
|
@ -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 }}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue