not able to link to other files in subdirectory

Hey there

I’m fairly new to Hugo and so far it feels like i tried everything to work around this issue but I couldn’t find anything about this specific topic.

I’m using the mainroad theme, Hugo v0.120.4 and trying to make the site multilingual.

My folder structure therefore looks something like this:

– de
— photos
— about_us
– en

My goal was that the menu bar doesn’t get too clustered and sites from the about_us directory will only get shown through the file, which shows up in the menu bar. The problem is sites from this sub-directory don’t get rendered and so not recognized by the file or by linking to them. As far as I’ve read is that it should be an file, in my case this broke the site completely.

The frontmatter part for the, for example, looks like this:

title: "People"
sidebar: true
        parent: about_us

the one for like this:

title = 'about_us'
draft = false
        pre = '<i class="fa-solid fa-code"></i>'
        weight = 2

The files gets rendered but doesn’t recognize any sites in the same directory.
I’m really happy for any help, i have the feeling that i missed something basic completely. :sweat_smile:

I think you mean “pages from the about_us directory”

I think you mean “pages from this sub-directory”

I think you mean “any pages in the same directory”

Your content structure should be something like this:

└── de/
    ├── about_us/
    │   ├──   <-- _INDEX.MD NOT INDEX.MD
    │   ├──
    │   └──

You are more likely to receive a prompt and accurate response if you post a link to the public repository for your project.

See Requesting Help.

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.

1 Like

I’m really sorry but it seems it was a naming issue. I didn’t realize the parent node had to be the same case letters as the title given in the file and not the folder name.

I realized it while creating a dummy-repo.

Thank you very much for trying to help me!