I get a long list of multiple of these warnings during build. How do I disable them?
WARN 2021/11/30 19:48:50 found no layout file for "HTML" for kind "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2021/11/30 19:48:50 found no layout file for "HTML" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
Hugo is trying to prevent a self-inflicted wound, both now and in the future. If you don’t want to see warnings, create templates to satisfy the requirements.
I figured out two of them, but now one is remaining. I have an index.son file in the root of the layout folder for site search. Which kind of a file should I create for it? I have tried list.json in layouts/_default but it is not working. Here is the warning. found no layout file for "JSON" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
Like this (I am using a dedicated page for search at /search/)
[outputs]
home = ["HTML","RSS","JSON"]
page = ["HTML","JSON"]
Edit: Thanks for the hint. I thought this page = ["HTML","JSON"] was required for the search results to show. Seems not based on localhost test. Solved.
The error is also appearing on Netlify. But on local, both hugo and hugo serve don’t show any errors. found no layout file for "JSON" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination. I have an index.json file in the layouts folder that builds a list of posts for my search page. Which file do I need to create to override this warning? Both list.json.json and index.json.json in layout_default didn’t work.