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 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 below:
git submodule add firstname.lastname@example.org:example-user/example-theme.git themes/example-theme
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
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.