Ok thank you, I will try and reproduce
hugo new site budparr-site
cd budparr-site
hugo new tool/toolone.md
---
title: "Toolone"
date: 2017-11-04T10:47:38-07:00
categories: [ "best" ]
---
hugo new tool/tooltwo.md
---
title: "Tooltwo"
date: 2017-11-04T10:47:41-07:00
categories: [ "best" ]
---
hugo new best-tools.md
---
title: "The Best Tools!"
url: "/best-tools/"
layout: best-tools
---
cd themes && git clone https://github.com/spf13/hyde && cd …/
mkdir layouts/page/ && touch layouts/page/best-tools.html
{{ define "main" }}
<div class="post">
{{$tools := where (where .Site.RegularPages "Section" "tool") ".Params.category" "best"}}
{{range $tools}}
<span><a href="{{ .Permalink }}">{{ .Title }}</a> <time class="pull-right post-list">{{ .Date.Format "Mon, Jan 2, 2006" }}</time></span>
{{end}}
</div>
{{ end }}
config.toml
baseURL = "http://example.org/"
languageCode = "en-us"
title = "My New Hugo Site"
theme = "hyde"
Then /best-tools/ works but nothing shows up.
If I modify best-tools.html to the following:
{{$toolsa := where .Site.RegularPages "Section" "tool" }}
{{range $toolsa}}
<li>
<span><a href="{{ .Permalink }}">{{ .Title }}</a> <time class="pull-right post-list">{{ .Date.Format "Mon, Jan 2, 2006" }}</time></span>
</li>
{{ printf "%#v" . }}
{{end}}
Then I get the two tools and their associated debug information, which contains:
"categories":[]string{"best"}
I wonder, would “.Params.category” “best” need to be modified to check for inclusion in the array?