Best way to support docs from tags/releases/branches #5694

Tried searching hugo docs and most of the themes available at https://themes.gohugo.io/ but I couldn’t find an example on how we can support docs being generated for multiple branches/releases/tags for same repo, similar to other static site generators support. Appreciate any feedback or pointers. Thank you.

Any future or ongoing efforts to support this as base feature?

Example: https://sphinx-rtd-theme.readthedocs.io/en/stable/