[Support Guide] Why isn’t my Hugo theme working correctly with Netlify?

Last reviewed by Netlify Support: September 2023

We get this question often. Luckily, there is both a common root cause for this issue and a solution for it!

Most often, Hugo themes added using git clone to clone the theme’s repository into your existing Hugo site’s codebase will not work with Netlify. This is the common root cause I mentioned.

So, what is the solution, you ask? Use the git submodule command instead!

The Hugo team created fantastic (and detailed) documentation about this here also:

You can add a theme using some form of the git submodule command below:

git submodule add https://github.com/<THEMECREATOR>/<THEMENAME>

Note: The command above is being run in the ‘base directory’ of the Hugo site. This is the directory that should contain Hugo specific sub-directories like content , public, static, and themes.

In many cases, this will resolve the theme not working issue. However, if the theme still isn’t working as expected, please let us know what you’re seeing (eg. a link to your failed build logs) so we can help troubleshoot.