I followed the Quickstart Hugo tutorial and it worked locally via localhost. However, When I deployed via Github+Netlify, the content would not work. The Ananke Theme/CSS was visible though. It was just the content of my-first-post.md that was missing.
in order to help you, we’d need to know the netlify instance name for your project at the very least, and also any build errors you received. When you say “did not work”, what do you mean, specifically?
When I said it did not work, I meant the content did not load. Below is a screenshot of my localhost vs netflify deployment. As you can see, the content is missing on netlify’s page.
did you commit and push the changed files since you made the changes?
are your netlify settings pointing to the right publish directory?
did you check your build log in the Netlify dashboard and see if there are any errors?
It would be great if you could either link us to your build logs or copy/paste them in here so we can check (if the 3rd point i mentioned does indeed show anything)
It looks like you pushed your public directory to the GitHub repository. When Hugo runs on our build pipeline, your public directory gets overriden with that empty index.html file.
To make it work, you need to create a template for the index page that reads the content from the content directory when we run hugo in our build pipeline. You can read more about the homepage template here:
i had this same issue, what happened to me was that I had set draft = true into the _index.md. Changed it back to false and everything started working again.
disclaimer - I’m pretty new to website programming but do know my around computers. So apologies in case I’m asking beginners questions
I’ve setup a site using hugo template vex-hugo and deployed it via github and netlify - love all three tools.
My problem is on localhost both homepage and subpages load normally. Once I deploy it to github&netlify only the homepage works regularly. The subpages only show white pages.
So far I’ve checked that
my netlify settings are pointing to the right publish directory
the build log in the Netlify dashboard doesn’t have any errors
I’m attaching the deploy details - Netlify App and the website address - www.spinenuances.com in case my description of the subpages only loading white space doesn’t make sense.
I found this thread and am hoping you guys will be able to help.
Hi,
please disregard my above question I’ve found the solution in the meantime.
I forgot to add the new domain the content.toml file when deploying and therefore all content data could not be found.
What I still don’t understand is why the homepage loaded with this error without problems but that’s really just a nice to have!
Hi,
I am facing the exact same problem. I was using the parsa-hugo theme. In my initial deploy everything was working fine. I cloned the repo and made some changes to add authors content pages to the website. The blog is working fine locally. So I pushed the changes and deployed it to netlify. Now, no content page is being loaded. The homepage and all other layout elements work, but the content pages don’t load. I have the right domain in the config.toml file. I don’t see a content.toml file.
Thanks for reaching out, and sorry to hear you have encountered this. Did you follow any of the above solutions that have been shared? If you are still encountering this let me know