Hi!
I’m using a yaml data file to generate a list of my publications with meta data on a “publications” page. My data file has a “type” field where I define the type of publication, for example whether it is a journal, book chapter, etc.
Currently I’m thinking about adding a filter functionality, to make it possible for the user to filter on publication type, for example: show me only “journal” articles or “book chapters”.
I was brainstorming about what would be the best solution to create this functionality, but my solutions so far seem hard to implement or maintain in Hugo:
- the type field is a taxonomy, and I have separate taxonomy pages for each publication type.
–> It doesn’t seem to be possible to populate a taxonomy based on information in the Data file? - I use a querystring in the URL to pass information about which type to filter, then when I’m iterating over the data map I only show data which equals this string.
–> It doesn’t seem to be possible to use querystrings, because Hugo uses this internally for the routing? - I manually create a page for every publication type and nest it under the publications content folder, and create separate templates for each category in which the right content is being displayed from the data file
–> This should work, but harder to maintain
Is there perhaps a solution that I didn’t consider? What would be my best option to go after?
Thanks!