Intelligent relative URL handling (embeds/links)

I want links/embeds to work when browsing source in GitLab as well as when built/deployed.

This works fine when I have a file _index.md because the folder structure remains “as is”.

But when using other filenames, Hugo changes the directory structure (e.g. folder/my-file.md becomes folder/my-file/index.html), so I have to make a choice… either use paths which work in GitLab or use paths which work when built.

Is there a way to achieve this?

Even if it involves contributing to the project- i’d love to give it a try, but am totally unfamiliar with the codebase/where to start.

Thanks

This article might be helpful.

1 Like

Brilliant- thanks, I will have a read and see if I can get it working :crossed_fingers:

1 Like