Filter the Photos page by category

By default,’s Photos page shows all of the JPEGs you’ve uploaded. I wanted to show only images from posts with the category “photo.” I’m still learning how Hugo works (and the Hugo documentation could be better if you ask me), so it took some time to figure it out. This is how you change it in the standard template. Find this line: {{- $list := where .Site.Pages "" "!=" nil -}}. Replace it with {{- $list := -}} where “photo” is the category.