Skip to content

feat(ui): add galleries#2205

Open
ancreat wants to merge 6 commits intocotes2020:masterfrom
ancreat:feature/galleries
Open

feat(ui): add galleries#2205
ancreat wants to merge 6 commits intocotes2020:masterfrom
ancreat:feature/galleries

Conversation

@ancreat
Copy link
Copy Markdown

@ancreat ancreat commented Jan 23, 2025

Type of change

  • New feature (non-breaking change which adds functionality)

Description

Add galleries

Additional context

Fixes #2136

Repository owner deleted a comment Feb 15, 2025
@lotusk08
Copy link
Copy Markdown

By this theme using Bootstrap, IMO, there's no need to add gallery features to display image collections by topic. You can try this simple structure:

{: .d-flex .justify-content-center }
Image 1 {: .me-2}
Image 2 {: .me-2}
Image ... {: .me-2}
Image 6

I’m using this for myself
image

@tis-starlight
Copy link
Copy Markdown

@lotusk08

By this theme using Bootstrap, IMO, there's no need to add gallery features to display image collections by topic. You can try this simple structure: ...

I believe this pull request addresses issue #2136, which pertains to the current behavior where all images within a post are grouped into a single lightbox gallery, regardless of their intended categorization.

With this update, images tagged with a specific gallery identifier (e.g., gallery1, gallery2, etc.) will now be grouped accordingly. This allows users to navigate only within the intended image set, ensuring that lightbox navigation is scoped to the designated gallery rather than encompassing all images in the post.

@lynkos
Copy link
Copy Markdown
Contributor

lynkos commented Apr 20, 2026

I've implemented my own gallery plugin. alt, width (default: auto), and height (default: auto) are optional.

For example:

{% gallery %}
    src="/assets/img/obsidian/my_storage_setup.jpg" alt="WD_BLACK SN850X NVMe SSD + OWC Express 1M2 Enclosure inside of a Pelican 1040 Micro Case" height="450"
    src="/assets/img/obsidian/my_storage_setup_open.jpg" alt="Opened Pelican 1040 Micro Case containing my storage setup" height="450"
    src="/assets/img/obsidian/my_storage_setup_details.jpg" alt="Contents of my Pelican 1040 Micro Case: My storage setup and accessories" height="450"
    src="/assets/img/obsidian/my_storage_setup_back.jpg" alt="Back of my OWC Express 1M2 Enclosure" height="450"
{% endgallery %}

Live demo can be found here.

Generated output looks like:
Dark mode gallery
Light mode gallery

There's certainly room for improvement, but should I create a PR for this feature (once it's ready)?

Edit: I forgot to tag @cotes2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Be able to define glightbox galleries to limit image scrolling

4 participants