eleventy
eleventy copied to clipboard
Absolute link paths based on input folder
Is there a way to render from markdown to html href link path based on the input folder e.g. /posts/some-post and not just /some-post?
All my posts are stored in markdown format (some-post.md) in the posts input folder.
In my markdown I just link to pages like that [My page](my-page.md). That way I can navigate between files in my content editors (Typora or Obsidian).
Currently, if I am on a page e.g. https://mydomain.com/posts/some-stuff and I click a link, I am taken to the page https://mydomain.com/posts/some-stuff/some-post that does not exist. I need to get to the https://mydomain.com/posts/some-post instead.
Is there a way I can do that?
Originally mentioned by @edgarascom in https://github.com/11ty/eleventy/issues/648#issuecomment-631636206
I would also love this, it would make navigation in GitHub work as well.
https://www.11ty.dev/docs/plugins/inputpath-to-url/ is this feature! Duplicate of #84