Content organisation mishap

Hi there,
I’ve been trying to set up a website with Hugo & the Blowfish template but it seems like I can’t quite manage to do what I want.
My homepage works fine, and I am trying to get my md files to build properly at the following addresses
website.com → homepage
website.com/experience → a list of experiences that I have
website.com/experience/experienceA → my first experience
website.com/experience/experienceB → my second experience
etc.
Initially I had tried to have the following structure:
content/experience/index.en.md → a list of experiences I have (in en)
content/experience/index.fr.md → a list of experiences I have (in fr)
content/experience/experienceA/index.en.md → experience A (in en)
content/experience/experienceA/index.fr.md → experience A (in fr)

But this didn’t work as I understood afterwards that index.md can only be used in leaf nodes, so I renamed my “list” pages to content/experience/list.en.md & content/experience/list.fr.md

So clearly now it’s not as nice because in the url it reads website/experience/list instead of just website/experience, but that is something I can live with, however now for some reason after making that change (renaming to list.xx.md) my images in content/experience/list.xx.md don’t load anymore.

I didn’t change any file locations or the contents of the files themselves so I’m confused as to why this could have happened.

Any help would be greatly appreciated and I’m sure I’m doing something really stupid…

Thanks in advance.

Mmh, i would say you need an _index.html for the list pages.

Blowfish has quite a bunch of documentation. Maybe the one about list pages among others.

Hi there, thanks for trying to help!

I have tried creating an _index.md, but it seems like what I write in it is completely ignored when the list page is generated.

Is there a way to overwrite the contents of that list page or are you stuck with only using what hugo and/or blowfish offers in terms of automatic generation?

And that doesn’t really explain why my images just aren’t loading properly anymore :confused:

To give more context, here is what my file structure looks like right now:
image

As expected the list.xx.md pages are rendered at website.com/experience/list, but for some reason without any pictures (which was not a problem when they were named index.xx.md and accessed from website.com/experience)

And there seems to be an automatically generated page at website.com/experience which I would assume gets info from _index.md but it seems that whatever md I write in _index.md seems to be ignored.

You increase your chances of getting help if you provide a link to your repository. That allows to see the whole picture, not just morsels of it.

Yeah I’ll just do that, I was reluctant to because there is a lot of personal data in it, but I guess I’ll make a public repo where it’s anonymised.

hard to tell without a reproducible example, too many factors (config, theme folders, frontmatter, md-files, …

the core concept is hugo for multilanguage: Multilingual mode | Hugo by filename. but Blowfish might/will add some con fig and layout arounds.

yes, cou may copy a theme file to the matching /layouts folder and change it. So yours will taken instead of the original.

same as with your missing pages - multiple possibilities and theme dependencies.


you’ll mostly get a more accurate answer if you provide a reproducible example one could build locally.

Fun way to realise that I actually have no idea how git submodules work and it’s an absolute pain to make any change.
That being said, I pushed something to my github. I hope it actually works. (tried anonymising but I gave up halfway, I probably left in my name or something somewhere but at this point I just want the problem to be solved, privacy be damned)

Also I realised that what I wrote in my _index.html ended up on my homepage for some reason (but still not the list page…).
I don’t know why. I clearly do not understand how it works.

You need an _index.md file at the root of /experience

Using index.md or list.md creates a leaf bundle, which isn’t what you want here.

See:

That’s exactly what I did. See previous posts.
Edit:
I just realised I actually created the _index.md in the wrong location (root of content instead of experience) by mistake and I hadn’t realised until now :sweat_smile:

:wink: So all solved for now?

If not make sure to update your repo and elaborate on the open point.

It has fixed most problems indeed!
Now the images properly render and I also have the pretty url I wanted :smiley:

All I still need to figure out is how to disable the generation of article headers underneath my markdown but I’m sure there must be a way to do it (I just don’t think it’s possible in blowfish’s configurator)

Maybe it’s in the layouts folder as you mentioned!
Checking it now

Update:
It’s empty.
To be fair I don’t want to build a layout, I just want to keep what’s already there, just remove the automatic generation of stuff underneath my markdown.
I’m sure it must be an option somewhere.

I spoke too soon.
For some reason images now work on _index.en.md but not _index.fr.md

I’ve updated my repo.

Expected (_index.en.md):
image

Obtained (_index.fr.md):
image

since 123.0 Hugo per default does not duplicate page resources to each language.

Each language is generated in it’s own folder, so only the default language gets the images. since you HTML hardcode the reference in your markdown it will point to nowhere except the default language. HTML code will not be updated when Hugo builds the site.

quick brute force with duplicating the images would be to turn on resource duplication in your hugo.toml.

[markup]
  [markup.goldmark]
    duplicateResourceFiles = true

read more about that here:

Oh wow, thanks for the info!

I have added this config in my hugo.toml and it seems to not have resolved the issue.
I updated my repo.

Sorry for bothering you so much :frowning_with_open_mouth:

Some of your image links in the fr language have no images/ prefix

<td><a href="/experience/companya/"><img class="detailsIcon" src="expand_circle_right_grey.svg"/></a></td>```

instead of

<td><a href="/experience/companya/"><img class="detailsIcon" src="images/expand_circle_right_grey.svg"/></a></td>

adding that at the first two places resolves to:

p.s. would have been good to give details and not just throw a “did not work” - the left images worked, the right one missed the prefix => you could have checked that easily, or?

1 Like

There’s a reason we don’t duplicate page resources. I encourage you to find another way to solve the problem.

1 Like

I’m with @jmooring here. For sure it will be better to avoid that and reorganize your file structure. And use less inline html in your markdown.

1 Like

Good point. The idea of Markdown was to simplify HTML generation. You turn that on its head by including a complete table element in your content, with thead, tbody and all that. Just use Markdown and style the table with CSS. There is, for example, no need to add a class detailsIcon to the img in your td element, since you can simply select that image in CSS with td > a + img.

The same applies to the br elements in your other content files. To quote from the endless wisdom of MDN:

[br] is useful for writing a poem or an address, where the division of lines is significant.

You are neither writing a poem nor an address. Use the appropriate CSS attributes like margin-bottom or padding-top or whatever to introduce space.