I’m struggling to find the correct syntax for what I want to do.
Like a “Read more articles” section, I want to exclude the active current page from a list of pages.
I have a “translationKey” in my .md files (pages), so I was planning to use that to do the comparison, which may not be the best way, but works for me (I’m all ears of you have a better way to do that)
{{/* Get pages in current section. */}}
{{ $p := where .Site.RegularPages "Section" .Section }}
{{/* Now exclude the current page based on Title. */}}
{{ $p = where $p "Title" "ne" .Title }}
{{ range first 3 $p }}
{{ .Title }}<br>
{{ end }}