🧝in 1.9.2-alpha

Shortcodes

11ty makes use of shortcodes, which are essentially re-usable bits defined at the generator level.

For re-usable pieces of code defined at the template level, take a look at Nunjucks “macros.”

Elfin comes with a number of shortcodes built in that you might find helpful. If you’d like to add your own shortcodes, check out Extending Elfin.

cl_url

This returns a properly-constructed Cloudinary URL for the asset passed as the argument. Additional arguments can be passed as a JavaScript object to apply transforms.

🔌 This shortcode is provided by Cloudinary.

See the documentation for more information on usage and configuration.

cl_image

This returns an entire image element for a Cloudinary asset. The primary advantage is the ability to easily construct a responsive image by passing a few arguments.

🔌 This shortcode is provided by Cloudinary.

See the documentation for more information on usage and configuration.