I have a very simple site (or so I thought) with nothing but posts. Posts are tagged - tags work fine. My site uses the Beautiful Hugo theme, and that’s fine, too.
Then I added votes, so I can rank posts (stories I call them) by popularity. Votes are quite crude at present - an html form is captured by an external service, I get an email, I edit params in front matter. Suits me for now - not the problem.
My problem is with the custom layout for the listing by popularity.
Following the solution to this question, I created a page content file:
popularstories.md, which specifies
layout: popular in its front matter (but has no content).
Then I created
layouts/-default/popular.html, which should collect all the pages and sort them by vote ranking. I know this layout works, because I used this excellent solution, and tried it as the default
But I can’t get it to work as a custom layout.
I have hugo installed locally, and I can see that hugo builds a directory called
popularstories - which I have pointed a menu item at - but there is nothing there (although the paginated files are built! - I can see them if I build a local ‘public’ set of files). I tried a lot of things…
Anyway, I have made a nice dummy version of the site in a public repo on gitlab with some sample posts.
So rather than try to explain lots of stuff which might be irrelevant, I’ll hope to be asked some questions!
Thanks for reading.