Managing figures⚓
Simple addition of a figure⚓
1 | |
Note
Here again, we can see that it is a relative path to the image. So it depends on the structure of your project.
Using glightbox plugin⚓
If you want to add image zoom functionality to your documentation, the glightbox plugin is an excellent choice, as it integrates perfectly with Material for MkDocs.
See: https://squidfunk.github.io/mkdocs-material/reference/images/?h=image#lightbox
Customize figure with CSS⚓
You need a CSS file (for example in docs/assets/extra.css)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | |
And this configuration in the mkdocs.yml file :
1 2 | |
Then, you can apply these options on an image with the previously defined css option:
1 | |
You can see that the image is centered and has shadow.
Adding a figure with HTML⚓
Useful to add image caption
markdown_extensions: - attr_list - md_in_html - pymdownx.blocks.caption
1 2 3 4 | |

