List custom taxonomy terms in a specific order (not alphabetical)

Here’s a summary of @Korka13’s solution with the slightly simpler use case of needing to list terms in a custom order of only one taxonomy, in case it helps anyone doing this for the first time as I was.

My content is “projects”, with each project belonging to one “gallery”.

In /config.yaml:

  gallery: galleries

Project content


title: "Soho"
  - Kitchens

Taxonomy pages


title: "Kitchens"
weight: 10


title: "Commercial"
weight: 20


{{ $galleries := $.Site.GetPage "galleries" }}

	{{ range $galleries.Pages.ByWeight -}}
			<a href="{{ .RelPermalink }}" class="{{ .Title | urlize }}'">
				{{ .Title }}
	{{ end }}