I am kinda stuck by seemingly trivial problem.
Here is the directory structure I have:
Every page within “pages” folder has the same structure:
---
title: "Title"
subtitle: "Subtitle"
keywords: ""
description: ""
date: 2023-03-14T11:28:43+01:00
draft: false
layout: article
year: 2021
url: some/deep/url
---
<div>I need to use some html here</div>
In the template, which is correctly being called for the _index.md files I have the following range loop:
{{- range (.Pages.GroupByParam "year").Reverse -}}
<div class="col-12 col-md-6 col-lg-4 card-item rate-list">
<h2>{{ .Key }}</h2>
<ul>
{{- range .Pages.ByTitle -}}
<li><a href="{{ .Permalink }}">{{ .Params.subtitle | markdownify }}</a></li>
{{ end }}
</ul>
</div>
{{ end }}
It seems like everything is supposed to be ok but it’s not. When building, I get the following error:
executing "partials/biz-days/list.html" at <.Data.Pages.GroupByParam>: error calling GroupByParam: there is no such a param
but there is! In every page under “pages” folder! What am I missing here?..