About the place of _index.md or _index.html

I’m trying to use links in Hugo folders without appending to their URLs,
by clicking on their links, in the browser, does _index. md/_index.html
fix that if there’s folders involved?

I’ve read your question a few times and I still don’t understand it.

I have an update post in one folder with links to files in another folder separate from it. Every time I click on the links in that post, they add the folder’s explained URL to the URL in the folder with the post with the links and give an error 404, instead of going to the exact URL of the files in the separate folder.

Can _index.md or _index.html help with that?

Sorry, I still don’t understand. Can you share your project repository?

Here:

I have a guide page update post in the jan folder
trying to link to the files in guides, but as I click on
each link inside it, the link is added to the end of the
url in the browser and leads to an error 404 page!

So, I was wondering if adding _index.md or _index.html
to each folder would fix that…

I’m also using Firefox, by the way.

Your markdown links have page-relative destinations, where they should be relative to server root.

Or to put it another way, do this:

[Book Formatting Guide](/guides/book-fd)

Not this:

[Book Formatting Guide](guides/book-fd)
1 Like

Fixed it!!! Thank you soooo very much!!!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.