LFP Shortcodes Documentation
Eleventy offers the integration of shortcodes to use in its templating and content creation (Shortcode documentation for Eleventy). They can either be single or paired and work with all default template languages supported by Eleventy (Liquid, Nunjucks, Handlebars, JavaScript).
Each shortcode offers extensive customization. The following example code snippets are written in Nunjucks (if you prefer or require to use another templating language, refer to Template Languages) and use TypeScript types to describe their interface.
Some shortcodes offer additional functionalities with optional arguments. By and large, you can ignore them entirely if you do not need them, or place an empty string "" to skip them. (Exceptions to this behavior are noted explicitly.)
See custom components to learn about optional and obligatory client-side scripts and stylesheets.
| Shortcode | Type | Arguments |
|---|---|---|
| Addendum | paired | content, date[1] |
| Blockquote | paired | quote[, attribution, cite][1:1] |
| Detail | paired | content, summary[, name, id, open][1:2] |
| Embed | single | url |
| Figure | single | src[, alt, caption, id, attribution] |
| Inflation | single | value, year |
| Listing | paired | content[, caption, id, hideCopy][1:3] |
| Math | single | content |
| Mathblock | paired | content[, caption, id][1:4] |
| Poem | paired | content[, caption][1:5] |
| Richlink | single | url |
| Table | paired | content[, caption, id][1:6] |