jekyll / jekyll-sitemap

Jekyll plugin to silently generate a sitemaps.org compliant sitemap for your Jekyll site
http://rubygems.org/gems/jekyll-sitemap
MIT License
961 stars 135 forks source link

http://localhost:4000/* in <loc> Tag #204

Closed charsdavy closed 6 years ago

charsdavy commented 6 years ago

Hello,

I use Jekyll 3.7.2, jekyll-sitemap 1.2.0 under Ruby 2.3.0p0 .

This is my current _config.yml:

url: www.chars.tech

This is my current sitemap.xml:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://localhost:4000/ninja</loc>
<lastmod>2014-04-08T00:00:00+08:00</lastmod>
</url>

and they should look:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.example.com/ninja</loc>
<lastmod>2014-04-08T00:00:00+08:00</lastmod>
</url>

Is there a possibility to realize this with jekyll-sitemap?

Thanks!

charsdavy commented 6 years ago

solution : JEKYLL_ENV=production bundle exec jekyll build

DirtyF commented 6 years ago

@charsdavy exactly because of https://jekyllrb.com/news/releases/#3-siteurl-is-set-by-the-development-server, glad you figured it out :)