One other thing I did was finally address how galleries were being rendered in RSS. If you use the Glightbox plugin, the titles and descriptions get stripped from the RSS. Or at least it does in Feedbin, where all the JavaScript gets remove and, thus, Glightbox doesn’t get a chance to initialise. I’m guessing the vast majority of RSS readers out there do likewise.

So I added an alternate shortcode template format which wraps the gallery image in a figure tag, and adds a figcaption containing the title or description if one exists. This means the gallery images get rendered as normal images in RSS. But I think this sacrifice is worth it if it means that titles and descriptions are preserved. I, for one, usually add description to gallery images, and it saddens me to see that those viewing the gallery in an RSS reader don’t get these.

Here’s the shortcode template in full, if anyone else is interested in adding this:

<!-- layouts/shortcodes/glightbox.xml -->

<figure>
<img src="{{ .Get "src" }}"
     {{ if .Get "alt" }}
        alt="{{ .Get "alt" }}" 
     {{ end }}
     {{ if .Get "title" }}
        title={{ .Get "title" }} 
     {{ end }} />
{{ if or (.Get "title") (.Get "description") }}
  <figcaption>
  {{ if .Get "title" }}
    <strong>{{ .Get "title" }} {{ if .Get "description" }} — {{end}}</strong>
  {{ end }}
  {{ .Get "description" | default "" }}
  </figcaption>
{{end}}
</figure>

I’ve also raised it as an MR to the plugin itself. Hopefully it get’s merged and then it’s just a matter of updating the plugin.