saimn / sigal

yet another simple static gallery generator
http://sigal.saimon.org/
MIT License
878 stars 169 forks source link

Mechanism for adding meta tags to album pages #331

Open nebulans opened 6 years ago

nebulans commented 6 years ago

This issue is a placeholder to establish an approach that would be acceptable for adding meta tags to albums. The concrete use case I have in mind is Facebook open graph tags so that when a link to an album is shared, the thumbnail, title and author information is correctly shown in the timeline.

The approach I'm thinking of would be to implement a new property on the Album object to contain meta tags set. The templates would then need updating to add each of these to the album page.

There would then be a "Facebook" plugin to generate the appropriate meta tags hooked into the album_initialized signal. Initially, this would just use the existing metadata provided in the album markdown file and present this in a way that Facebook will use sensibly.

Is this approach in line with your design philosophy etc?

saimn commented 6 years ago

Yes, it seems fine. So if I understand correctly the templates must be modified to display these tags with the album page, and you want to populate the list of tags with a specific plugin ? Could you also make it possible to simply put the tags in the markdown file ?