bounce-rs / bounce

The uncomplicated Yew State management library
https://bounce-rs.org
Apache License 2.0
100 stars 10 forks source link

Helmet support for meta tags incorrectly merges OpenGraph meta tags #62

Closed kinnison closed 1 year ago

kinnison commented 1 year ago

The Open Graph protocol (https://ogp.me) specifies the use of <meta> tags to provide graph data (it's how Facebook does fancy page metadata for links).

The distinguishing attribute for these is property but deduplication of meta tags in the helmet feature does not use that attribute when keying the tags during merge.

Please could you add property to the set of attributes used for meta tag deduplication?

futursolo commented 1 year ago

I think the current deduplication logic is overly complicated.

I intend to switch to the logic used by next/head where the key attribute is used to deduplicate tags.

kinnison commented 1 year ago

Is there anything I can do to help with this, or should I leave you to it?

futursolo commented 1 year ago

It may still take some time before I can get to this.

If you want to submit a pull request to fix this in the meanwhile, I am more than happy to review it.

kinnison commented 1 year ago

I've submitted a PR which adds the relevant attribute to the existing deduplicator since I'm not very good at understanding next-js. I realise it's not ideal, but it does solve my use-case for now. if you're not OK to merge/release with that tweak then I understand, I can continue to use my fork for now.