When I run hugo server the frontpage displays, but other pages do not until I have modified the corresponding index file; so content/map/index.md needs to be modified before the /map/ page will display. If I run hugo --cleanDestinationDir --minify to deploy the site, these pages also don’t get written to.
WARN 2020/06/29 08:10:59 found no layout file for "HTML" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination
But I can make that error go away by adding an empty layouts/_default/home.html - and that doesn’t solve the problem. Any help would be greatly appreciated, I am stumped - I would’ve thought that hugo server and simply hugo should create the same pages at all times.
No, I have not. Do you think it matters for the problem at hand? I can make that error go away by adding an empty layouts/_default/home.html - and that doesn’t solve the problem.
I’m not using a theme at all. Since I already had a css file to work from, I didn’t see any point. I was following this themeless gitless hugo tutorial.
@TamaMcGlinn, you appear to missing a list.html file in your layouts/_default directory. When troubleshooting issues such as these it is far more efficient to post a link to a public repository for your project.
Creating an empty list.html and home.html does not change the behaviour of this bug. You make a valid point; I should make a minimal reproducer. I’ve been trying to do that this week, but when removing my site-specific content I don’t wish to share, the problem sometimes disappears.
git clone git@github.com:TamaMcGlinn/hugo-tutorial.git
cd hugo-tutorial
hugo server
visit the link given, and observe that clicking either about or contact yields a 404. But now modify content/about/index.md (even whitespace in the yaml frontmatter that won’t matter) and observe that the link works.
In layouts/_default/single.html, use this construct to build the tag list:
<ul>
{{ range (.GetTerms "tags") }}
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
{{ end }}
</ul>
When specifying a date in front matter, use this format: 2020-06-30T08:43:35-04:00. You may not need it now, but you may later on.
Use TOML instead of YAML for front matter format. With TOML, dates are first class citizens. This is not true for YAML or JSON, and using TOML from the outset may make your life easier later on.