We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For easier extension of the image shortcode later, it may be useful to switch to an object-based configuration like this:
{{ image({src: "test.jpg", alt: "Hello World", classes: ["test"]}) }}
Instead of a single additionalAttributes property, we can collect all “unknown” properties and “spread” them onto the image element.
I build something similar here: https://github.com/mvsde/website/blob/d8c67a2b7333d8ddd36993cfdd9a9dade6558769/.eleventy/shortcode-image.js#L22
This keeps the shortcode options uniform and reflects how attributes work in “normal” HTML.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
For easier extension of the image shortcode later, it may be useful to switch to an object-based configuration like this:
Instead of a single additionalAttributes property, we can collect all “unknown” properties and “spread” them onto the image element.
I build something similar here: https://github.com/mvsde/website/blob/d8c67a2b7333d8ddd36993cfdd9a9dade6558769/.eleventy/shortcode-image.js#L22
This keeps the shortcode options uniform and reflects how attributes work in “normal” HTML.
The text was updated successfully, but these errors were encountered: