Sitemap generated with relative URLs only

The problem was raised in this issue, where our sitemap only contains relative URLs, which are disallowed by the spec and rejected by at least Google.

The sitemap is generated by the jekyll-sitemap plugin, and I just updated it to the latest version allowed by Pages, so that isn’t the issue.

What’s weird is that a local build produces a correct sitemap (http://localhost:4000/docs/ etc.), only the one auto-built by Pages has this issue—thus, I believe that the way Pages overrides the url and/or baseurl config attrs breaks this plugin.

Are we missing something here? Thanks in advance!


Jekyll (or the jekyll-sitemap plugin here) does not know the absolute URL of your website unless you specify it in your configuration file.

Have you tried setting the url to in your configuration file already?

Yes, I have, and even with a cache-less refresh (Ctrl+F5), the URLs in the sitemap were still relative. That’s why I’m assuming it must be something with the way GH Pages overrides this setting. Or have I missed anything?

I confirmed the jekyll-sitemap plugin can handle absolute paths just fine.

I took you repo and re-applied your configuration changes. The sitemap looks great:

Pages assets are served behind a CDN so you may have to wait up to 10 minutes for full propagation. A Ctrl+F5 refresh would not make our CDN propagate faster :slight_smile:

I suggest you re-apply the configuration change and give it a bit of time after a Pages rebuild for the changes to be reflected.

Alright, I’ve tried again, I’ll get back in an hour or so ^^

[EDIT] Well, looks like it didn’t take 10 minutes for me to see the change this time. Thanks!

1 Like