I needed to know which is the nth post of a certain post type in hugo. Just placed this code in my theme’s index.html file at the top and it just works:
|
|
and it outputs
1 - Placebo - A Place For Us To Dream
2 - Die Antwoord - $O$
3 - Santana - Supernatural
4 - Morcheeba - Fragments of Freedom
5 - Cliff Martinez - Drive (Soundtrack)
[ . . . ]
Of course, I could expand this into a shortcode, add some parameters, and so on, but for now it’s just fine.