Open
Description
If I have a collection of pages, say all pages in the current category or another taxonomy, I would like to find the numerical index of a specific page (usually, the current page).
This would be useful for outputting something like "this post is k out of n in the series on..."
I guess I could write a linear search using templates, but it seems really clunky and inefficient. Maybe there should be an .IndexOf method on the Pages object?
Example of intended use:
{{- $pages := where site.RegularPages "Params.categories" "intersect" .Params.categories -}}
{{- $currentIndex := indexOf $pages . -}}