statiqdev / Statiq.Web

Statiq Web is a flexible static site generator written in .NET.
https://statiq.dev/web
Other
1.64k stars 235 forks source link

Sitemap Links Are Relative #949

Closed NSTA1 closed 2 years ago

NSTA1 commented 3 years ago

Awesome tool, thank you - am starting a blog with it!

As far as I can tell, site map URLs must be absolute (Google search console alerted me to this when I tried adding my blog's sitemap to it).

Is there an easy way to make [just] the Site Map use absolute urls? I've tried setting the Host variable - but that changes the urls for the entire site (which makes testing/debugging impossible as it immediately links out to the live site)

daveaglick commented 3 years ago

It sounds like you may have a strange combination of settings. The way it's supposed to work is that supplying a Host only creates absolute links in cases where it's required like the sitemap and RSS feeds. Otherwise the behavior should still be to output relative links almost everywhere else. It's possible you may a setting that's causing this desired behavior to break.

Some questions:

NSTA1 commented 3 years ago

It was indeed an incorrect setting: I had set MakeLinksAbsolute to true when experimenting with something else - very sorry to waste your time. Thanks again for a great project :)

daveaglick commented 3 years ago

No problem at all, glad you got it working!