[SOLVED] Site only displaying submodule content

Sorry if this is a dumb question. I’m new to using hugo (and webdev in general), and I have a site linked up to using a theme as a submodule. Hosting using gitlab, and the CI/CD with that seems to be working well. Although I’ve hit a bit of a roadblock when it comes to creating blogs / other content. My URLs to pages don’t seem to be working, and then I noticed that one of the default pages that came with my theme submodule does work.

So for whatever reason, it looks like content in my linked submodule is accessible, but my content in my site’s folder is not. Is there a setting somewhere that I need to change so that it looks for content in my sites folder opposed to the submodule github?

Hi,

It’s difficult to say what’s going on and it would help if you link to your repo.

I have it set to private so I’m not sure if you’ll be able to see it without me approving first. But feel free to give it a try.

Thanks!

https:// gitlab.com/Awalser/mlm-cure.git

Edit: Changed permissions so it’s public now.

Hi,

I had a look at your repo and here are a few things you might want to try:

  • put your /blogs section under /content (I’m assuming this is meant to be content posts?)
  • set draft:true in the front matter of your md files

And a few questions:

  • I noticed you had a mix of html and md files under your content. Is this intentional?
  • What hugo version are you running? (run hugo version in the root of your hugo project)

Thanks for the response! I’m heading to bed for the night, but I’ll give these solutions a try tomorrow.

The .html file was a test I was trying to see if that would work (I’m not super familiar with .md files, so figured it was worth a shot). Guessing hugo doesn’t use .html files?

Hugo Version:
Hugo Static Site Generator v0.48/extended darwin/amd64 BuildDate: unknown

Hugo does recognise html files inside content. In fact, if you run hugo server you should see it in action on http://localhost:1313/mlm-cure/test/. I just wasn’t sure that was intentional.

@mlmcure please read Requesting Help. That has a lot of information to help you use Hugo and get help here in the forums. :slight_smile:

Sorry for the late response, and thanks for the feedback!

if you run hugo server you should see it in action on http://localhost:1313/mlm-cure/test/ .

I do see this working! Although I’m a bit confused as to why this path is ‘mlm-cure/test/’ and not ‘mlm-cure/content/test.html’ ? Is this also how .md files work? (I’m not able to access any of my md files), for example:
content/posts/my-first-post.md
content/blogs/what-is-mlm.md

What path would I use to get to these pages?

Thanks again!

The way Hugo works is that everything that is in your /static folder gets dumped straight into the root folder of your site. Things in /content (and subdirectories) get built using the theme or layouts you’re using…and placed in the root folder of your site (well, if they’re in a subdirectory, they’ll be built into a subdirectory of the same name).

So when those markdown files are built into HTML, they’ll end up at

  1. /posts/my-first-post
  2. /blogs/what-is-mlm

Unfortunately I’m still having trouble accessing the following pages:

https://awalser.gitlab.io/mlm-cure/posts/my-first-post
https://awalser.gitlab.io/mlm-cure//blogs/what-is-mlm

Based off the repo provided above, can you think of any other reason why these pages still aren’t accessible?

Thanks again!

Probably because they both have draft: true.

1 Like

That did it!

Looks like I’m all good now. Thank you to everyone who has helped out!