Range rendering the taxonomy title on netlify, but not locally

Hello! Currently having some problems :frowning:

I am displaying the latest 3 posts from a taxonomy type like this:

  {{ range last 3 ( where .Site.Pages "Type" "community"  ) }}
  {{ .Render "patch"}}
  {{ end }}

It works perfectly locally, I get the 3 latest posts from type community rendered with the patch.html layout.

The problem is the build on netlify is not the same. It shows 2 community type posts and a post with the taxonomy title. In this case “Communities” with a Link to community.

I have been looking into nesting (!=) (“Title”) (“Community”) But without success.

What could be wrong?


What are the Hugo versions that you use locally and on Netlify?


I was just thinking about this! I haven’t setup the netlify account myself.

Im just invited on the github repo as a collaborator. Will ask the admin, I’m thinking this could be the issue.

That was it! Doh!

I was building on netlify using 0.58 and locally on 0.78

I just pushed a netlify.toml file with:



1 Like

Tip: Use [build.environment] instead of [context.production.environment] in netlify.toml for this setting. This makes the Hugo version fixed for ALL deploys, be it your main published branch or pull requests or any other branch-deploy that is going on. This is better if you “set and forget” it.

Should you ever later on want to set a specific Hugo version for a specific environment or branch, you can work with the context section.

1 Like

Just to add, I recently encountered the reverse scenario. I was using the latest Hugo version locally, and the default on Netlify.

Not for taxonomies, but rendering other pages. Netlify was not rendering the page, whereas locally it was. Exact same solution - Bringing the Hugo versions into parity solved the issue. :slight_smile:

1 Like

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