I want HTML files generated for offline use and access them via file:// protocol. Based on this answer I created this config.toml.
baseURL = "/"
uglyURLs = true
relativeURLs = true
languageCode = "en-us"
title = "My New Hugo Site"
Currently I am using the ananke theme from the intro tutorial. But I assume this is not a good one for my use case because of warnings like this.
WARN 2022/03/13 16:56:42 found no layout file for "HTML" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
I also wonder why this is a WARN instead of an ERR because no HTLM file was generated. Something is blocking.
The layouts folder in the hugo project folder is empty. But themes/ananke/layouts/ has some stuff in it; but no page.*.
Maybe another theme?
I assume “page” is fitted to something like a hugo template?
What is the hugo-way in that case? Creating a template or getting it from another them. Or make hugo teat my md files not as “page”?
Yes, use a different theme. I don’t personally know of any to recommend, but I think Ananke hasn’t been updated in a bit.
I sometimes use Hugo to generate output that does not include HTML; offering it as a concept to think of Hugo as an adaptable tool, which generates HTML very easily among other things.
The Ananke theme works mostly for local browsing too; you only need to fix the layout files in that theme where it links to the site homepage. It will be something like what I did in this commit which I mentioned in this comment.
In this commit, I replaced my local layout files with the ananke theme and the site builds fine without any warnings.