mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
Use .Site.Pages in the documentation examples instead of .Site.Recent
This commit is contained in:
committed by
Anthony Fok
parent
d7ef272a23
commit
b0b6a8c7ac
@@ -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>
|
||||
|
Reference in New Issue
Block a user