I have a section for products. I want to group articles that are related to that product “underneath” the product page. To clarify, here’s what the full path to one of the articles might look like:
/product/pet_rock/articles/care_and_feeding
I’d like to group the articles underneath the product section, since each product might have a very similarly named article (e.g. getting-started).
I imagine that the directory structure might look something like this:
What are your thoughts about being able to display the subset of articles that are nested underneath the product? Would I need to wire them up with some sort of tag/value in the articles’ frontmatter, or is there a way to get an array of pages that sit beneath a certain path?
If I understand correctly, sounds like you are trying to do more or less what I was trying to do when I asked this question:
As @moorereason suggested, I ended up going with taxonomies as Hugo only generates a list view for the top level section (‘product’ in your case).
Interesting aside: as my site navigation depends only on the taxonomies now, I decided to use the ‘redundant’ product list view to implement search functionality with the excellent isotope.js used to filter the list of all products by whatever the user types in the search box. Works pretty well and almost instant results for my use case (500 products)!