eleventy icon indicating copy to clipboard operation
eleventy copied to clipboard

Absolute link paths based on input folder

Open edgarasben opened this issue 5 years ago • 1 comments

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

edgarasben avatar May 20 '20 19:05 edgarasben

I would also love this, it would make navigation in GitHub work as well.

montanaflynn avatar Oct 13 '20 06:10 montanaflynn

https://www.11ty.dev/docs/plugins/inputpath-to-url/ is this feature! Duplicate of #84

zachleat avatar Nov 21 '25 17:11 zachleat