Skip to content

Enable by image

You can enable lightbox of images separately by adding page metadata glightbox-manual: true through markdown_extensions meta and adding on-glb class on the image through markdown_extensions attr_list, and keep other images without lightbox effect. Enable meta and attr_list via mkdocs.yml:

markdown_extensions:
  - meta
  - attr_list

Check more details about meta on the official document.

Check more details about attr_list on the official document.

Demo

Only images(first two images) with on-glb class will be added to the lightbox effect. Other images(third image) will be disabled.

---
glightbox-manual: true
---

![Lanyu, Taiwan](../images/gallery/blueswen-lanyu.jpeg){ .on-glb } 
Lanyu, Taiwan. Credit: Blueswen

![Hallstatt, Austria](../images/gallery/blueswen-hallstatt.jpeg){ .on-glb } 
Hallstatt, Austria. Credit: Blueswen

![Obertraun, Austria](../images/gallery/blueswen-obertraun.jpeg)
Obertraun, Austria. Credit: Blueswen

Lanyu, Taiwan

Lanyu, Taiwan. Credit: Blueswen

Hallstatt, Austria

Hallstatt, Austria. Credit: Blueswen

Obertraun, Austria

Obertraun, Austria. Credit: Blueswen