Sitemap Links Are Relative
NSTA1 opened this issue · comments
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)
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:
- Are you specifying settings (specifically
Host
) in a file likesetting.yml
or in yourProgram.cs
via code? - Where are you seeing absolute links throughout the site? Is that in your own layout code, or something that Statiq Web or the Cleanblog theme came with?
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 :)
No problem at all, glad you got it working!