Hugo Gitsubmodule Error
By Fabian Brash
So I’ve run into this error everytime I’ve cloned my site or pretty much any Hugo template, but it was really annoying for me when it comes to my personal blog, I would clone my private git repo and try to build my site and I would see the below error message
WARN 2024/02/06 07:26:21 found no layout file for "html" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
So this time I sat down to figure out what was going on and fix this once and for all, I hope. Well after a quick Google I found the solution, we just have to do the following after cloning my repo, or probably any other Hugo repo that has a template.
git submodule init
git submodule update
hugo server -D #serve up our site in dev mode and load draft posts