Contents

Enter the Hugo Multiverse

TL;DR

If you want to run multiple versions of Hugo, enter these commands in your terminal:

1
2
3
4
5
sudo snap set system experimental.parallel-instances=true

sudo snap install hugo hugo_extended

sudo snap refresh hugo_extended --channel=extended/stable

You can now run the Hugo Extended Version by running something like this in your terminal whilst in the directory of your Hugo project:

1
hugo_extended serve -D --noHTTPCache

Source

Steps used where found at this source.

The Rest of the Story

There are certain Hugo themes (like the one for this website) that need the Hugo Extended Version in order to build. However, certain themes may not build with the extended version of Hugo.

So, to address this, why not install both?

I have found the Hugo snap package to be perfect for building my Hugo static sites.

You can actually install multiple versions of any snap, but for this post, I am only dealing with Hugo.

Start by enabling the parallel instances Snap feature:

1
sudo snap set system experimental.parallel-instances=true

Then install your first copy of the Hugo snap package:

1
sudo snap install hugo

Now install a second copy of Hugo snap package, but this time you will be giving the second copy an alias of hugo_extended:

1
sudo snap install hugo hugo_extended

You will then change the Hugo snap package channel for the second copy of Hugo that is installed on your system:

/posts/hugo-multiverse/hugo-multiverse-01.png

In the terminal, type:

1
sudo snap refresh hugo_extended --channel=extended/stable

Conclusion

Now you can cd into your Hugo static site directory and build your static site using the Hugo Extended Version with a command like this:

1
hugo_extended serve -D --noHTTPCache

End of Line.