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

LinkRoot is duplicated in sitemap.xml. #158

Closed
taks opened this issue Jan 5, 2021 · 5 comments
Closed

LinkRoot is duplicated in sitemap.xml. #158

taks opened this issue Jan 5, 2021 · 5 comments
Labels
⚠️ Bug Something isn't working as expected

Comments

@taks
Copy link

taks commented Jan 5, 2021

The LinkRoot value is duplicated in the output of sitemap.xml like <loc>http://host/LinkRoot/LinkRoot</loc>.

@daveaglick daveaglick added the ⚠️ Bug Something isn't working as expected label Jan 5, 2021
@daveaglick
Copy link
Member

I am unable to replicate this on several sample sites, so I suspect there might be an interplay between your LinkRoot setting and the files (and their destination). Are you using the GenerateSitemap module directly or is this happening when using Statiq Web?

@taks
Copy link
Author

taks commented Jan 5, 2021

I'm using Statiq Web.
I create a sample project for this issue at https://github.com/taks/Statiq.Web.Sample.

@daveaglick
Copy link
Member

Awesome! Thanks a ton - a repro will make this much easier to track down.

@taks
Copy link
Author

taks commented Jan 6, 2021

I check GenerateSitemap and find out why the LinkRoots are duplicated.
The cause is that GetLink is called twice in the following.

?? new SitemapItem((delegateResult as string) ?? context.GetLink(input));

location = context.GetLink(new NormalizedPath(location), true);

@daveaglick
Copy link
Member

Resolved by #193 - fix will go out with the next release in a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️ Bug Something isn't working as expected
Development

No branches or pull requests

2 participants