Deploy Hugo project on Vercel
After pushing the code to GitHub, I associated the repository with Vercel to deploy the site. However, after the successful deployment, the site always showed an XML page. I checked the Vercel logs and found the following error message:
Building sites … WARN 2024/09/07 14:41:14 found no layout file for "HTML" for "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2024/09/07 14:41:14 found no layout file for "HTML" for "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2024/09/07 14:41:14 found no layout file for "HTML" for "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2024/09/07 14:41:14 found no layout file for "HTML" for "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2024/09/07 14:41:14 found no layout file for "HTML" for "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2024/09/07 14:41:14 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2024/09/07 14:41:14 found no layout file for "HTML" for "taxonomyTerm": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2024/09/07 14:41:14 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2024/09/07 14:41:14 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2024/09/07 14:41:14 found no layout file for "HTML" for "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2024/09/07 14:41:14 found no layout file for "HTML" for "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
Solution
The reason for the error is that the default version of Hugo in Vercel does not match. You need to specify the version of Hugo in the Vercel configuration file.