How to add a version control in Hugo Site?

How to add a drop down in hugo site where in different version of the site can be changed?
Like in https://getbootstrap.com/ this website you get option to change the version of the site.
We can make 2 3 branches in github and display as a different version in hugo site?

Well, their repository is open source :wink: have a look inside there.

A good start is the data-folder. They have a versions file there.

I assume, if you search for how docs-versions.yml is called in the repo you will find out how to achieve your goal. It’s probably done via tags, not branches though.

1 Like