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

Add ability to specify default directory and omit .svg extension #4

Open
n-older opened this issue Oct 25, 2023 · 2 comments
Open

Add ability to specify default directory and omit .svg extension #4

n-older opened this issue Oct 25, 2023 · 2 comments

Comments

@n-older
Copy link

n-older commented Oct 25, 2023

It would be nice to be able to specify a default subdirectory like images that automatically gets prepended to the path we pass into svg while also omitting the file extension as it seems very redundant given the nature of the method.

Example:

A file existing at src/images/icons/check.svg would allow us to simply write erb <%= svg 'icons/check' %> instead of erb <%= svg 'images/icons/check.svg' %>

@ayushn21
Copy link
Owner

Great idea ... it'd definitely reduce the noise .... the change would have to be backward compatible though so no existing sites break.

I don't know when I'll get time to work on this so if you'd like to create a PR for it then I'm happy to accept this change, otherwise I'll work on it when I get some time.

Thanks :)

@n-older
Copy link
Author

n-older commented Oct 25, 2023

No worries! Just something I thought I'd mention since I'm used to writing it the shortened way from years of using Middleman.

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

No branches or pull requests

2 participants