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.
My content dir has:
├── articles
│ ├── 2020-04-30-some-article.md
│ └── index.md
├── contact
│ └── index.md
├── index.md
└── map
└── index.md
My layouts dir:
├── _default
│ ├── baseof.html
│ ├── single.html
│ └── tag.html
├── partials
│ ├── nav_item.html
│ └── posts_list.html
└── shortcodes
├── base_url.html
└── partial.html
I get a warning when I first run hugo server:
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.
Hi …
could you have added type: home to one of your markdown content files?
This would result in looking for an HTML layout for ‘home’
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.
Hi
And what about the markdown files in /content/maps/ and content/contact/
somewhere in your markdown files it is saying to use the home template
Also check your theme examplesite folder and see if there is a template there
None of the markdown files specify a type.
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.
Then contact the author … about step 15
2020-June-25 Updated step 15. Explore the layouts directory below so it uses the new Hugo v0.73.0+ .Kind terminology.
@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.
From the tutorial you’ve been using…
See the list.html file?
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.
Ok, I have a minimal reproducer now;
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.
Thank you, that fixed the problem. Thanks extra for the other suggestions, I’ve implemented them all.