Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate conflicting <title>, <meta descripiton=""> and schema.org components #33

Open
nakigoe opened this issue Jul 3, 2023 · 2 comments

Comments

@nakigoe
Copy link

nakigoe commented Jul 3, 2023

@jsakamoto
いつもお世話になっております
thank you for your hard work! Your extension is working for my website https://nakigoe.org

The only problem I encounter now is that I have to remove all the SEO from the wwwroot/index.html, since the extension generates conflicting SEO components. It takes them both from wwwroot/index.html and from every page indexed by the extension:

  • duplicate conflicting <title></title>
  • duplicate conflicting <meta description="">
  • duplicate conflicting schema·org SEO microdata and formats

There is a lot of manual labour ahead now for every single page, to fix the SEO data.

What the appropriate solution might be to remove the duplicates, since it might not be the best idea to remove the <title>nakigoe.org</title> tag from the static wwwroot/index.html, since every page requires a <title></title> tag by W3 standards.

@jsakamoto
Copy link
Owner

Hi @nakigoe,

Unfortunately, I've no good idea for the moment. Because that behaviour you encounted is based on the architecture of Blazor's built-in PageTitle and HeadContent components.

However, I can not strongly recommend it to you, but there is one alternative way. It is what using the "Toolbelt.Blazor.HeadElement" library instead of using the Blazor-built-in PageTitle and HeadContent components.

https://github.com/jsakamoto/Toolbelt.Blazor.HeadElement/

The "Toolbelt.Blazor.HeadElement" library also has some disadvantages and difficulties in use, so it is not perfect for replacing Blazor's built-in components. But the "Toolbelt.Blazor.HeadElement" library eliminates duplication of <title> and elements put in the "wwwroot/index.html" by default.

@ElderJames
Copy link

I think we can run a command after the html generated that remove the first title element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants