Site with different lists of sections

Hi everyone,

sorry for asking what might well be a newbie question. I’m considering switching the website of our project to a Hugo-based site. The site has different, well, parts to it, each with their own (possibly hierarchical) list of content. For example, the Documentation part has different main topics, often with a number of subtopics. When the user is in the Documentation part, the navigation bar should only display what is in there, including the hierarchy. On the other hand, the API part has its own set of topics.

What I thought so far was that each part should correspond, in Hugo, to a section. But before I invest the work to migrate our site, I would like to know whether each section can have its own hierarchical navigation menu.

As an example of what I am talking about, this site is what we’re currently generating with Jekyll. The Wiki part corresponds to what I referred to as Documentation, while the other parts would end up in the new API part.

The examples I’ve been looking at so far didn’t seem to divide their site into different “hermetically sealed” parts, if that makes sense.

I think your intuition is correct.

You can do the navigation bar you’re describing with Hugo’s menus. Check out the examples there and use a small test site to see if that would suit your needs.

Sections can definitely be treated as “hermetically sealed” if you choose to do so. For example, “get me all the pages in the “documentation” section, and no others” is {{ range where .Site.Pages "Section" "documentation" }}.

That sounds pretty good, thank you so much. I have actually managed to overlook the whole Extras section… :confounded: