okfn / website

The code behind okfn.org
https://okfn.org
MIT License
108 stars 107 forks source link

Enable a different og:image per language #994

Open lucpretti opened 12 months ago

lucpretti commented 12 months ago

When a page is translated into a different language, it's possible to edit all of its settings except the og:image attribute. This is currently managed through the Sidebar option in the Page menu. The problem is that a new page in another language automatically inherits the image uploaded to the sidebar.

So each page (including each translation) needs to have its own og:image.

It's relevant in cases such as: https://okfn.org/en/projects/digital-public-infrastructure-for-electoral-processes/ https://okfn.org/es/proyectos/infraestructura-publica-digital-para-procesos-electorales/

Both links above currently have the following og:image:

thumb-DPI

But clearly the Spanish version should have the following:

thumb-DPI-es

Next steps

pdelboca commented 11 months ago

@lucpretti this ticket will require some work (a couple of days) to properly implement it given that now we are not doing things in a good way.

Context

django-cms provides a couple of tools to this with this scenarios:

Current implementation

Currently we are using an old obsolete SideBarExtension(PageExtension) to implement the image tag. This should have been done by cleaning the obsolete extension, and implementing a new one.

lucpretti commented 11 months ago

Thank you for the research @amercader @pdelboca!

I'm ok with your approach and with any changes in obsolete/new plugins. Just wanted to make sure you know this is not a super priority - I'd rather implement #995 before.