Hi, I am currently creating a new site with Hugo. To reduce cost and simplify my online presence I have decided to combine my professional, activism and hobby content into one site to be hosting on git hub and use netlify as the front end.
Currently I am trying to get Hugo to loop through a list of pages inside a few subdirectories inside of a sub directory on the root. The reason I need multi-leveled sub-directories is to keep my profession, activism and hobbit categories organized so I am sticking with the subdirectories approach incase I need to move a particular section. That way I only have to move the directory for the particular catagory, and also I dont like clutter. If someone has a better way of doing this based on what I want to accomplish, im all ears. The layout is included in the image attached. So far I have been unable to find a way to create a list template that will loop though a set of sub-directories and create a section page of from content in each subfolder for each subcatagory in my profession, activism and hobbies.
For instance in the image I have a directory what’s called “profession” in that directory i have a subdirectory called “services” and I would like to create a page of content for /profession/services from the subdirectories “computer”, “content”, “data”, and “information” I would like to do the same with the “activism” and “hobbies” directories as well.
I have read that Hugo’s list templates dont really recognize subdirecties when it comes to populating content. Right now when I vist my site “/profession/services” it renders a blank page. I am assuming that this is happening because there is not any markdown files in the service directory for the list template to render.
Is there a way to tell the template to recurse though subdirectories inside of a subdirectory that is attached to the content root and build a page inside of the 3nd level subdirectory based on what’s in the 4rd level subdirectories?
My development site is at: https://github.com/scottrlarson/academic-kickstart
Edit: I removed paragraphs that were confusing and re-evaluated my wording based on what maiki said.