Closed Rhysol closed 6 years ago
What are you trying to achieve? See https://jekyllrb.com/docs/usage/#override-default-development-settings
@DirtyF I want get \<loc> http://www.mywebsite.com/2017/12/12/hello.html \<\/loc> . I have follwed the instructions, but it didn't work. If the 'url' option did not work at all?
Did you run JEKYLL_ENV=production bundle exec jekyll build
after reading our docs?
@DirtyF I am having the same issue (#216 just missed this one here, sorry).
In my Dockerfile
I have:
FROM jekyll/jekyll
COPY website /website
RUN gem install bundler
RUN chown -R jekyll /website
RUN JEKYLL_ENV=production bundle exec jekyll build --source /website
WORKDIR /website
CMD ["jekyll", "serve"]
This results in localhost:4000/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://0.0.0.0:4000/blog/</loc>
</url>
<url>
<loc>http://0.0.0.0:4000/contact/</loc>
</url>
<url>
<loc>http://0.0.0.0:4000/</loc>
</url>
<url>
<loc>http://0.0.0.0:4000/services/</loc>
</url>
<url>
<loc>http://0.0.0.0:4000/team/</loc>
</url>
<url>
<loc>http://0.0.0.0:4000/trainings/</loc>
</url>
</urlset>
Any ideas what's going wrong?
I don't know anything about Docker, but the CMD ["jekyll", "serve"]
line concerns me. Is this running jekyll serve
? If so, that would be the problem, as it is running without JEKYLL_ENV=production
That fixed it now. I'm setting JEKYLL_ENV
globally now. Thanks.
@DirtyF @davidobrien1985 I also have fixed it . Just run JEKYLL_ENV=production bundle exec jekyll build
did not work. It must set JEKYLL_ENV=production
globally before run jekyll serve
. Thanks a lot!
@Rhysol Feel free to improve the docs if this wasn't obvious. 😉
In my _config.yml , I set these: host: 0.0.0.0 port: 80 url: www.mywebsite.com The generated sitemap.xml do not use url, but use host(0.0.0.0). Am I config error? How can I fix this?
result: \<loc> http://0.0.0.0/2017/12/12/hello.html \<\/loc>