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…
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
To give more context, here is what my file structure looks like right now:
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.
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.
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
It has fixed most problems indeed!
Now the images properly render and I also have the pretty url I wanted
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.
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.
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?
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.