-
-
Notifications
You must be signed in to change notification settings - Fork 10k
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 a set of filters to generate HTML tags for assets #5560
Conversation
@ashmaroli What's the motivation for this? Any particular use case you would like to share with @jekyll/core to demonstrate the usefulness of these additional filters? |
I don't see what purpose this serves, for Jekyll Assets it serves a clear purpose, seeking out an actual asset and building the tag for you, for this, it seems to be encapsulating what you can already do with |
Hey @ashmaroli! I think I'm also unclear on the motivation here. Having used a number of Rails helpers that do this, I always found that I was better off just hand-writing the template. I don't think we're doing anything too special here that a user would find very annoying to do over and over again. The thing that is useful/novel is that you pass just a URL and you get full HTML for whatever it is you are pointing to. Of course, the want for more and more options to modify parameters will be a bummer for this feature. What do you think? |
Oi.. sadly, I do not have a concrete motivation to row against the unanimous tide against this PR.
|
210b025
to
43e5ae2
Compare
I don't want to go down the road for having a special filter for every conceivable HTML tag. People are going to want options so you can specify certain attributes, etc, and that is just a lot of bloat we don't need in core. Feel free to ship as a plugin though, as always. ❤️ |
This PR adds a module of filters that generates a corresponding HTML tag for the given asset.
image_tag
for imagesstylesheet_tag
for stylesheet(s)script_tag
for javascript filesIntended usage: