Partial sitemap/toc for sub-site?

I have a site X that’s (currently rendered with MkDocs but that can change) and I want to include it in an existing Hugo site Y. Site X is a self-contained documentation site and has a nested directory / file structure, something like:

  • index
  • introduction
  • things <-- directory
    • thing1
    • thing2
  • widgets <-- directory
    • widget1
    • widget2

There is a sidebar that shows the table of contents / sitemap for site X. I want to keep that when it is migrated into site Hugo site Y. I want to show the toc/sitemap for just this section of the site.

From what I know, it is not possible to render a subsection of the sitemap (i.e. just the site that is part of X), but I know there have been some recent changes to Hugo. Is there a way to do this?

EDIT: I think that ‘menus’ might the way to do this.

Thanks in advance.

I’m not sure when you last used Hugo, so I can’t speak to the updates, but you do have the ability to at least create a custom sitemap with the current version (19):

That said, as far as writing to multiple formats (including XML), you are going to have even more flexibility sometime soon: