Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RenderPlugin: support relative paths #3201

Open
megheaiulian opened this issue Feb 14, 2024 · 0 comments
Open

RenderPlugin: support relative paths #3201

megheaiulian opened this issue Feb 14, 2024 · 0 comments

Comments

@megheaiulian
Copy link

megheaiulian commented Feb 14, 2024

Is your feature request related to a problem? Please describe.

When using the RenderPlugin you have to specifiy paths relative to the project dir.
This is very annoying when you want to put the template and the related css/js file in the same folder.

Describe the solution you'd like

At least for .liquid templates pass tagToken.file (the file where the tag is in) as context to shortcodeFn (https://github.com/11ty/eleventy/blob/main/src/Engines/Liquid.js#L172).
This would allow the RenderPlugin to access file from context.
When file is available the RenderPlugin could first try a relative path based on path.dirname(file) then fallback to a project relative path and finally error out if path is not found

Describe alternatives you've considered

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant