HUGO

Hugo site, either local or on Netlify, doesn't detect my content folders

I have two content folders: one called “About” and the other one called “blog”. It looks like this on the private github repo, where netfliy pulls the data and build:

I’m not entirely sure what’s missing both locally and on netlify. Locally, the about folder doesn’t turn in a section, but the markdown page shows up. On Netfliy, no post at all shows up, and no section can be seen.

I’m using the simplog theme.

config.toml looks like this

baseURL = "[redacted]"
languageCode = "pt-br"
title = "My New Hugo Site"
theme = "simplog"
author = "Tet"
description = "[redacted]"

[params]
    colorTheme = "default"

Hi there,

It’s difficult to tell just from a screenshot. If I had to guess: are your content files marked as draft?

Have a read about Requesting Help to see how you can make it easier for us to help you.

No, they aren’t marked as a draft. Here’s another screenshot:

I was really afraid of asking questions here, but I followed a few tutorials and couldn’t find out why things don’t work here. I don’t know what I’m missing.

We don’t know what’s missing either. We don’t know which tutorials you followed. We don’t know if you diverged from these tutorials, or if you mixed and matched instructions. We don’t know what’s in the rest of your files.

As per the link I posted above:

Let us see your code

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.

Sorry. Here’s the repository: GitHub - Tetizera/not-live

You have:

content
├── About
│   └── about.md            # This renders at /about/about/, NOT /about/ 
└── blog
    └── primeiro_post.md

More details here: Content Organization | Hugo

If there is still a difference in what gets built locally vs Netlify, make sure you are using the same Hugo version on both: Host on Netlify | Hugo

I did a few changes in the repo, and now the about page is the first content to show up. In both /about/ and /about/about, that page shows up.

content
| - - About
| - - - - - about.md
|
| - - posts
| - - - - first_post.md

I still am having the issue that only one of the posts shows up in the main page (localhost:1313) and that there are no sections (one About and one Posts). From what I understood in the documentation, each folder represents a section, or branch. Am I wrong?

I got help from a friend and he mentioned that sectionPagesMenu = "main" was missing from the config.toml file. I added it and the sections show up!

The only problem I have now is that the home page is blank. I mean, the section names are still there, but there’s no list of posts made in /posts/. To this end, I added


[[menu.main]]
identifier = "posts"
name       = "Posts"
url        = "/posts/"
weight     = 110

But I still don’t get the posts in the home page from /posts/.

Problem solved. Not sure why, since I was just trying to copy and paste my friend’s repo instead of cloning it entirely. Anyway, you can have a look at the working repo here: GitHub - Tetizera/not-live

BTW the homepage was blank due to a thing on Netlify’s side. If you’re here for the same issue, see My Hugo theme doesn’t load , only bare html