Sha256: ccdc56df0235e939e4bb4190584d2e69773d74509d57af366bf9324e78d5b027
Contents?: true
Size: 1.07 KB
Versions: 8
Compression:
Stored size: 1.07 KB
Contents
--- sort: 3 --- # Fragments The following are not complete markup; they're building blocks that you can use to make things outside the scope of JPT. - `direct_url` Generates an image and returns only its url. Uses `fallback_width` and `fallback_format`. ```yml # _data/picture.yml markup_presets: direct: markup: direct_url fallback_width: 800 fallback_format: webp ``` ``` {% raw %} {% picture direct myimage.jpg %} --> /generated/myimage-800-abcd12345.webp {% endraw %} ``` - `naked_srcset`: Builds a srcset and nothing else (not even the surrounding quotes). Note that the (image) `format` setting must still be an array, even if you only give it one value. (This is on the list of things to improve.) ```yml # _data/picture.yml markup_presets: only_srcset: markup: naked_srcset widths: [800, 1200, 1600] format: [webp] ``` ``` {% raw %} {% picture only_srcset myimage.jpg %} --> /generated/myimage-800-abcd12345.webp 800w, /generated/myimage-1200-abcd12345.webp 1200w, (...) {% endraw %} ```
Version data entries
8 entries across 8 versions & 1 rubygems