I have been stuck for a while with this. I’m trying to use the apply function on a slice of Pages to get a slice of pages path. In other languages would be something like:
const pages = [new Page(1), new Page(2), ...]
pages.map( page => page.Path ) // returns ['path/to/1', 'path/to/2', ...]
I see that there is an apply function but didn’t find a way to use it like this since it’s not possible to create your own functions in Hugo.
Any insight? Thanks in advance!