jekyll-sitemap: baseurl not used making URL's wrong in sitemap
I’ve just used this plugin to generate a sitemap for a new blog.
In my _config.yml
I have
baseurl: "/blog"
url: "http://example.com"
And the sitemap.xml
ends up been full of urls omitting /blog/
<url>
<loc>http://example.com/a-blog-post/</loc>
<lastmod>2014-08-02T18:00:00+01:00</lastmod>
<priority>0.8</priority>
</url>
Have I missed something obvious or is this an issue?
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 15 (8 by maintainers)
Commits related to this issue
- Add tests to ensure that the baseurl is added to the url. Ref: #50, #47. — committed to jekyll/jekyll-sitemap by parkr 10 years ago
In your
_config.yml
:url
does not mean “hostname.”baseurl
should be used only when you want a relative link. That is it’s sole purpose. When you want an absolute URL, usesite.url
instead ofbaseurl