jsakamoto / Toolbelt.Blazor.HeadElement

Head element support (change the document title, "meta" elements such as OGP, and "link" elements) for Blazor apps.
https://demo-blazor-headelement.azurewebsites.net/
Mozilla Public License 2.0
158 stars 11 forks source link

Allowing multiple og:image elements #32

Open ceir opened 2 years ago

ceir commented 2 years ago

Defining multiple tags with the same keys can be useful. In the case of "og:image" Facebook sharing (and prehaps other SEO parsers) will take all the elements and attach all the images to the post.

Currently a code like this:

<Meta Property="og:image" Content="https://img1" />
<Meta Property="og:image" Content="https://img2" />

Will leave the header with only a single - using just the value from the latest declaration (in this case with value "https://img2". Adding the option to have multiple items of the same sort would be useful.

jsakamoto commented 2 years ago

@ceir Thank you for your proposal! Well, your proposal makes sense, so I'll try to implement the ability to allow multiple tags with duplicate keys. However, it must not be easy on the current architecture of this library. It has to make big changes to this library to realize it. It must take a long time. Moreover, I can not spend much time maintaining this library because this is my weekend hobby product, so I'll appreciate it if you are patient, even if it takes a few months.