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

Using Blazor Static Rendering Does Not Work #11

Closed TheLazyLemur closed 3 years ago

TheLazyLemur commented 3 years ago

Dotnet core 5 Blazor Server

When I use Blazor Static Rendering with this library, certain parts of my HTML break, Namely the <pre> and <code> tags, if I try to change the title while statically rendering with Blazor these tags behave very strangely.

Switching to Server Prerender Does however work.

If i simple remove the call to the library weather that be as a service or components, I get this same behavior.

jsakamoto commented 3 years ago

@TheLazyLemur Could you attach a sample project that can reproduce the problem to this thread?

TheLazyLemur commented 3 years ago

@jsakamoto Sure no poblem here you go. It has two pages one where the one has its title being changed and the other not. You'll see the problem. Note that this problem also happens whn using the service instead.

Thanks for getting back to me

RenderingError.zip

jsakamoto commented 3 years ago

@TheLazyLemur I fixed this issue, and published the new version of the library.

Please try it out.

Thank you for reporting! 👍

TheLazyLemur commented 3 years ago

Seems to have worked perfectly. Thanks for the quick help and for making such a useful package.