feat(image shortcodes): add lazy loading (#116)

Additionally sets the `alt` parameters as optional and cleans HTML output.
This commit is contained in:
Óscar 2023-08-26 01:57:19 +02:00 committed by GitHub
parent 1be3fa886c
commit 1c3db86b75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 41 additions and 30 deletions

View file

@ -1,7 +1,7 @@
+++
title = "Custom shortcodes"
date = 2023-02-19
updated = 2023-08-24
updated = 2023-08-26
description = "This theme includes some useful custom shortcodes that you can use to enhance your posts. Whether you want to display images that adapt to light and dark themes, or format a professional-looking reference section, these custom shortcodes have got you covered."
[taxonomies]
@ -15,6 +15,8 @@ quick_navigation_buttons = true
## Image shortcodes
**Note**: all image shortcodes have two optional parameters: `full_width`, which defaults to `false` (see [below](#full-width-image)), and `lazy_loading`, which defaults to `true`.
### Dual theme images
Useful if you want to use a different image for the light and dark themes: