diff options
| author | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2022-03-27 18:44:06 +0530 |
|---|---|---|
| committer | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2022-03-27 18:44:06 +0530 |
| commit | 575cc0ca8c4e5904c7ae77e76db812c52e5f8ed1 (patch) | |
| tree | 29b83f765f6ccae88651886167681b4afdb71069 /layouts/_default/index.json | |
| parent | 975972e04181007c61302054d18735dc440a0586 (diff) | |
Use `site` function instead of `.Site` or `$.Site`
- The site function provides global access to the same data as the .Site page method.
- Current context (`.`) is never considered.
Diffstat (limited to 'layouts/_default/index.json')
| -rw-r--r-- | layouts/_default/index.json | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/_default/index.json b/layouts/_default/index.json index 2c86f7c..feeb437 100644 --- a/layouts/_default/index.json +++ b/layouts/_default/index.json @@ -1,5 +1,5 @@ {{- $.Scratch.Add "index" slice -}} -{{- range .Site.RegularPages -}} +{{- range site.RegularPages -}} {{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }} {{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary) -}} {{- end }} |
