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

Add Meta Element without overwriting the existing one #23

Open markus-renezeder opened 2 years ago

markus-renezeder commented 2 years ago

In some cases it would be nice to add the same meta tag multiple times eg the og:image

In my case: I want to display more images or create a carousel if the link is shared on facebook. For this it is necessary to add the same tag multiple times.

BR Markus

jsakamoto commented 2 years ago

Thank you for your proposal. I'll consider how to implement it.

But unfortunately, it will not be easy because of the architecture of this library. So it will take a long time until implemented the multiple "og:image" feature.

By the way, .NET 6 now supports the <HeadContent> component.

See also: https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-6-preview-7/#modify-html-head-content-from-blazor-components

If you can chose .NET 6 platform, please consider to use the <HeadContent> component for the multiple "og:image".