inputPathToUrl plugin doesn't respect relative paths for links in non-top level templates #3312
Labels
enhancement
feature: inputpath-to-url
needs-votes
A feature request on the backlog that needs upvotes or downvotes. Remove this label when resolved.
Operating system
macOS Monterey v12.7.3
Eleventy
3.0.0-alpha.10
Describe the bug
The plugin requires that links to sibling pages on pages in sub directories be prefaced with the directory chain leading to their sub directory instead of the conventional
./
Reproduction steps
eleventyConfig.addPlugin(InputPathToUrlTransformPlugin);
Expected behavior
The
href
value on /index.html is as expected,/page1/
✅Expected
href
value on /about/index.html/about/page2/
✅Actual
href
value on /about/index.html./page2.md
❌Reproduction URL
demo
https://11ty-inputpathtourl-demo.pages.dev
code
https://github.com/brianzelip/11ty-inputPathToUrl-demo
Screenshots
Note that the demo on Cloudflare Pages behaves differently than in local dev mode.
Here is the /about/page2 on Cloudflare showing the top-level index.md in place of the nested /about/index.md (note the URL in the address bar):
Here is local dev:
In both cases the href value is the same.
The text was updated successfully, but these errors were encountered: