mirror of
https://github.com/gohugoio/hugo.git
synced 2024-07-05 08:42:12 +00:00
Use .Site.Pages in the documentation examples instead of .Site.Recent
This commit is contained in:
parent
d7ef272a23
commit
b0b6a8c7ac
|
@ -161,7 +161,7 @@ e.g.
|
||||||
<ul>
|
<ul>
|
||||||
{{ $page_link := .Permalink }}
|
{{ $page_link := .Permalink }}
|
||||||
{{ $tags := .Params.tags }}
|
{{ $tags := .Params.tags }}
|
||||||
{{ range .Site.Recent }}
|
{{ range .Site.Pages }}
|
||||||
{{ $page := . }}
|
{{ $page := . }}
|
||||||
{{ $has_common_tags := intersect $tags .Params.tags | len | lt 0 }}
|
{{ $has_common_tags := intersect $tags .Params.tags | len | lt 0 }}
|
||||||
{{ if and $has_common_tags (ne $page_link $page.Permalink) }}
|
{{ if and $has_common_tags (ne $page_link $page.Permalink) }}
|
||||||
|
@ -259,7 +259,7 @@ e.g.
|
||||||
series: golang
|
series: golang
|
||||||
+++
|
+++
|
||||||
|
|
||||||
{{ range where .Site.Recent "Params.series" "golang" }}
|
{{ range where .Site.Pages "Params.series" "golang" }}
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
|
@ -382,7 +382,7 @@ so, such as in this example:
|
||||||
```
|
```
|
||||||
<nav class="recent">
|
<nav class="recent">
|
||||||
<h1>Recent Posts</h1>
|
<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>
|
<li><a href="{{.RelPermalink}}">{{.Title}}</a></li>
|
||||||
{{end}}</ul>
|
{{end}}</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
Loading…
Reference in a new issue