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

[Feature Request] Options to supply Type, Hreflang, Title and other options in Link Element #28

Open fingers10 opened 2 years ago

fingers10 commented 2 years ago

@jsakamoto, Many thanks for the wonderful package. This works awesome solving many problems.

I'm trying <Link> element and I'm not able to specify type="application/xml", hreflang="en", title="some title" for it.

Example,

<Link rel="sitemap" type="application/xml" title="Sitemap" Href="@($"{BaseUrl}sitemap.xml")" />
<Link rel="alternate" type="application/rss+xml" Href="@($"{BaseUrl}atom.xml")" />
<Link rel="alternate" Href="@($"{BaseUrl}blogs/{Slug}/")" hreflang="en" />
<Link rel="alternate" Href="@($"{BaseUrl}blogs/{Slug}/")" hreflang="x-default" />
<Link rel="canonical" Href="@($"{BaseUrl}blogs/{Slug}/")" />
<Link rel="index" title="@Title - Base Title" Href="@($"{BaseUrl}blogs/{Slug}/")" />

This throws script error.

Please can you add an option to supply Type, Title, Hreflang to Link Element?