digitalfabrik / integreat-cms

Simplified content management back end for the Integreat App - a multilingual information platform for newcomers
https://digitalfabrik.github.io/integreat-cms/
Apache License 2.0
56 stars 35 forks source link

API: Add social media headers endpoint #2084

Closed svenseeberg closed 4 months ago

svenseeberg commented 1 year ago

Motivation

We currently have a quick and dirty solution for rendering social media headers (https://git.tuerantuer.org/Integreat/social-media-meta-tags/src/branch/master/meta.php). This should be replaced by a long term solution within the CMS.

Proposed Solution

We probably need to keep the part with the Nginx Server Side Includes. However, we should move the functionality of the PHP script directly into the CMS and also support events, locations, etc.

Alternatives

Implement the full URL pattern and API functionality in our hacky PHP script. :-(

Additional Context

Design Requirements

sarahsporck commented 1 year ago

I think this really has a lot of potential. It is always better to render SEO tags on the initial render. Therefore, directly injecting them on the server makes lots of sense and is also how SEO is implemented traditionally. Currently, it feels like a mix between the responsibilities in the nginx and the frontend.

Minimum requirements

As a minimum requirement <title>, <description> tags, the Open Graph protocol tags and twitter card tags should be present.

Additions

We could also inject JSON-LD for events or breadcrumbs in the backend, which we are currently implementing in the frontend.

Problems

I am not sure if all sites in the frontend are also present

Additional context

For more context check out IGAPP-100

Medium:

• Facebook: Beitrag teilen, Sharing-Text als Beitragstext • WhatsApp: Auswahl öffnet sich, an wen es geschickt werden soll, Sharing-Text als Beitragstext • Twitter: Beitrag teilen, Sharing-Text als Beitragstext • Mail: neue E-Mail zum Verfassen öffnet sich, Sharing-Text als E-Mail-Text, Betreff: „Integreat Leseempfehlung: Titel des Beitrags“ (Betreff-Text in die jeweilig genutzte Sprache in der Web App übersetzen) • PDF: Format öffnet sich

Ansicht:

Anzeigebild (vorhandenes Bild aus der Web App (wenn kein Bild vorhanden ist, dann vom Promo Team ausgewähltes Bild benutzen), Titel, Anfang vom Text (Teaser)

Sprache:

Anzeige in der jeweilig genutzten Sprache

Sharing-Text:

„Gerade in der #IntegreatApp entdeckt. Was hältst du davon?“ • Auch in die jeweilige Sprache übersetzen, die für den Integreat Inhalt genutzt wurde

svenseeberg commented 1 year ago

I added a bug label because there is a bug in our current implementation outside this CMS. The current solution does not work for HTTP/2 connections.