"where" or "like" operator not working with netlify github workflow?

I have the following logic to retrieve all pages with a path that matches a regex:

{{- $xVersion := index (findRE `v\d+\.\d+\.x` .RelPermalink) 0 }}
{{- $docs := where site.RegularPages ".Path" "like" (printf "%s%s%s" "/docs/" $xVersion ".*") }}

this behaves as expected locally, but fails when I attempt to deploy a preview site via netlify on github: Netlify App

11:07:56 AM: ERROR 2024/03/14 18:07:56 render of "page" failed: "/opt/build/repo/themes/containerd/layouts/docs/single.html:20:15": execute of template failed: template: docs/single.html:20:15: executing "main" at <partial "docs/dropdown.html" .>: error calling partial: "/opt/build/repo/themes/containerd/layouts/partials/docs/dropdown.html:3:13": execute of template failed: template: partials/docs/dropdown.html:3:13: executing "partials/docs/dropdown.html" at <where site.RegularPages ".Path" "like" (printf "%s%s%s" "/docs/" $xVersion ".*")>: error calling where: no such operator

source: containerd.io/themes/containerd/layouts/partials/docs/dropdown.html at squash_doc_hosting · haddscot/containerd.io · GitHub

Which version are you using locally, and which version are you using to build your site on Netlify?
image

ah, looks like we’re using 0.111.3 with netlify, versus 0.123.7 locally. will update. thanks.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.