-
Notifications
You must be signed in to change notification settings - Fork 96
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
Auto-generating the <picture> syntax? #54
Comments
One nit, since there's no art-direction involved here, the syntax should be based on |
@yoavweiss I was looking for a grunt plugin that could do that. Only found this one, though. Unfortunately, it deals with markdown files and uses the I ended up writing my own plugin for HTML files and Probably also helpful for #55. |
@Smaxtastic - looks great! :) I have some comments, but I'll just open a bug on your repo |
Awesome, thanks @Smaxtastic |
Once we have multiple image sources, we need a tool for generating the
<picture>
syntax. Ideally, these two tasks should both be automated and combined into one task. Maybe the optimal approach would be to have a task that parses content files (be it HTML or Markdown), detects “wild”<img>
elements (not contained in<picture>
) and then (1) generates the various image sources (based on a given configuration) and then (2) generates and injects the<picture>
syntax, replacing the original<img>
s.Notes:
<img>
s, we could use a flag:<img data-picture src="…">
<img data-picture="post">
,<img data-picture="aside">
. etc.The text was updated successfully, but these errors were encountered: