HUGO: error calling where: can't evaluate the array by no match argument or more than or equal to two arguments

旧时模样 提交于 2019-12-11 14:40:09

问题


I am trying to create a ul list of the sections of my hugo site and their child pages that have a specific param.

I basically want a multi-level ul menu at the side like so:

  • Intro
    • Page 1
    • Page 2
  • Section
    • page 3
    • page 4

Here is the Hugo Code I have so far:

<ul class="section-one-and-two-pages">
{{ range .Site.Pages }}
    {{ range where ( where .Section  "intro" ) or ".Params.type" "==" "article" }}
   <li>{{.Permalink}}{{.Title}}</li>
    {{end}}
{{ end }}
</ul>

At the top of my pages (.md) I am adding:

type: = "article"

However I cannot seem to get this to work. I keep getting the Error:

Error calling where: can't evaluate the array by no match argument or more than or equal to two arguments

When compiling. Any ideas?

来源:https://stackoverflow.com/questions/46848467/hugo-error-calling-where-cant-evaluate-the-array-by-no-match-argument-or-more

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!