File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -62,8 +62,9 @@ It is possible to add pictures to your posts in markdown. First you need to drop
6262``` jinja
6363{{ figure(
6464 img="/blog/img/your-picture-name.avif"
65- caption="A description of the picture")
66- }}
65+ caption="A description of the picture" # can be set to an empty string
66+ alt="A picture description for screen readers" # optional, should only be used when leaving the caption empty
67+ ) }}
6768```
6869
6970This shortcode ensures that images have a consistent look across posts.
Original file line number Diff line number Diff line change 11< figure style ="height:100%; ">
2- < img src ="{{ img }} " alt ="{{ caption } } " />
2+ < img src ="{{ img }} " {% if alt %}alt ="{{ alt }}{% endif % } " />
33 < figcaption > {{ caption | markdown | safe }}</ figcaption >
4- </ figure >
4+ </ figure >
You can’t perform that action at this time.
0 commit comments