I thought I had it figured out, but I still notice some problems with my website. Even my development site is wrong. First of all, how is the home page generated? I had no _index.md file in my root, yet it was creating a list of posts that I had made. So I created an _index.md under my content folder and now my home page shows that plus the list of posts. But here’s the kicker. The posts are only as recent as January 16th. No new post is showing up on my home page, yet they show up in my Posts section.
This is my first issue. If someone could explain how the home page gets created and how these posts get added, maybe I can resolve this issue before I move on to the next ones.
I’m trying to create a sports website. My content folder is quite simple. I have the _index.md file and four other folders, each with their own _index.md file except for the posts folder.
I was using the Ananke theme but I’ve switched to the beautifulhugo theme. I’ve done no modifications to the theme at all. So if I can figure out the home page issue, maybe I can start to figure out a few others.
But do you have any idea why my listing of posts has stopped? Is there any way to clear it out? I’m thinking I might have created new postings under content and not under the posts subfolder. But then I deleted the files or moved them. But what would cause Hugo to still think there are posts while not including the more recent posts?
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.
Hugo in Action by Atishay Jain is a hands-on book you can build a website with and learn at least the basic concepts of Hugo, or dive deeper if you want.