Daniel's Weblog
Posts Tags Colophon
About

Tags / Hugo



Gallery theme for Hugo by Nico Kaiser. Recently I needed a photography portfolio website. In the past I’ve used Flickr but I wanted it on my own domain. After poking around and trying a few options I found this. In the past when I’ve relied on other people’s templates I’ve found them personalized in ways that worked met their needs but did not apply to my situation; this appears to be the exception and I’ve found it almost perfect, I only had to tweak some image compression settings.

SCR-20261021-nuye.jpeg


where not in (Hugo) via jmooring I’ve been pulling my hair out over this for a little while, how do you write where not in in Hugo?

The docs say you can do it but I was never able to make it work.

Shout out to Joe Mooring on the Hugo forums for this solution:

  {{ $p1 := where site.RegularPages "Type" "in" site.Params.mainSections }}
  {{ $p2 := where $p1 "Params.categories" "intersect" (slice "moments" "thinks") }}
  {{ $p := $p1 | complement $p2 }}