sonata-project / SonataSeoBundle

Symfony SonataSeoBundle
https://docs.sonata-project.org/projects/SonataSeoBundle
MIT License
135 stars 90 forks source link

Allow array values for meta tags #554

Open BlackWiCKED opened 3 years ago

BlackWiCKED commented 3 years ago

Feature Request

Currently if we want to add multiple og:image tags, the addMeta function overrides the previous values and will use only the last one. According to the Open Graph specs at https://ogp.me/#array it should be possible to define multiple tags with the same property name. SonataSeoBundle is currently not offering this feature as far as I'm aware of, but please correct me if I'm wrong.

VincentLanglet commented 2 years ago

CC @core23 Not passing a string seems deprecated since 2.x https://github.com/sonata-project/SonataSeoBundle/blob/dff934e28eea0a6f0ce3ed4759c39cfe18f8b8ca/src/Seo/SeoPage.php#L142

Maybe this should be changed before the NEXT_MAJOR

core23 commented 2 years ago

IMHO the method signature for the addMeta is correct. Unfortunately the method does not add any new meta value, it replaces it.

Maybe it just needs a fix here: https://github.com/sonata-project/SonataSeoBundle/blob/dff934e28eea0a6f0ce3ed4759c39cfe18f8b8ca/src/Seo/SeoPage.php#L154

Can you do this @BlackWiCKED ?

BlackWiCKED commented 2 years ago

Sure, I can give it a try.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.