When running hugo server, pages do not appear to be built unless I actively edit and save them AFTER the hugo server is awake and running.
This is surprising as it implies that the server doesn’t scan the website and build everything when it is turned on, and leads to many “page not found” errors.
HOWEVER, this only appears to occur if content contains a “index.md” file. If that is missing then all is well.
A tiny example repository can be found here:
I am using Hugo 0.56.0, on Ubuntu 18.04.3 LTS system. My theme is cayman.
If there any other information I can provide?
Directly under the content directory there is an index.md
that converts the other content files to assets of a single page Page Bundle, hence the other “missing” content files.
To provide metadata for your index/homepage you need to use _index.md
Also see:
2 Likes
I’m having this same problem, but not with the fighting index.md
issue.
My directory structure is something like:
content
- feature
-- index.html
- feature2
-- index.html
With each of the index.html
s looking roughly like:
---
title: feature
---
<div>a feature</div>
When I run hugo
or hugo server
no pages are built, and no warnings or errors are shown - no 404s, only whitepages. But if I run hugo server --renderToDisk
and then go through and change and save some unnecessary whitespace in each index.html
, the files are correctly generated to the /public
directory. Running the latest hugo Hugo Static Site Generator v0.59.1/extended darwin/amd64 BuildDate: unknown
but it was also a problem with 0.58.3
Happy to share a repo if it’d help anyone