Skip to content

Commit b7185c8

Browse files
committed
Add support for gallery image captions in Magnific Popup overlays
- Apply optional `title` attribute to image anchors that trigger Magnific Popup overlays - Close #334
1 parent 9fa7b23 commit b7185c8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

_includes/gallery

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@
2525
{% else %}
2626
"{{ img.url | prepend: "/images/" | prepend: base_path }}"
2727
{% endif %}
28+
{% if img.title %}title="{{ img.title }}"{% endif %}
2829
>
2930
<img src=
3031
{% if img.image_path contains "http" %}
3132
"{{ img.image_path }}"
3233
{% else %}
3334
"{{ img.image_path | prepend: "/images/" | prepend: base_path }}"
3435
{% endif %}
35-
alt="{% if img.alt %}{{ img.alt }}{% endif %}">
36+
alt="{% if img.alt %}{{ img.alt }}{% endif %}">
3637
</a>
3738
{% else %}
3839
<img src=
@@ -41,7 +42,7 @@
4142
{% else %}
4243
"{{ img.image_path | prepend: "/images/" | prepend: base_path }}"
4344
{% endif %}
44-
alt="{% if img.alt %}{{ img.alt }}{% endif %}">
45+
alt="{% if img.alt %}{{ img.alt }}{% endif %}">
4546
{% endif %}
4647
{% endfor %}
4748
{% if include.caption %}

0 commit comments

Comments
 (0)