bundle update.bundle exec jekyll build.Version:
-Minimal mistakes - latest
bundle exec jekyll serve
Should the sitemap.xml still contain localhost:4000 even while we push to the gh-pages Github branch?
Or if we need to change to our domain, such as repo.github.io instead of "localhost:4000" manually?
Because, sitemap.xml is rebuilt everytime locally and all links change back to localhost:4000.
Sitemap generation is done by the Jekyll Sitemap plugin. So any questions or unexpected results when using it should be filed on that repo.
That said I think this is an easy fix on your part. There are some small differences in the jekyll serve and jekyll build commands. The big one obviously is serve fires up a server.
It also overrides url: in your _config.yml to localhost:4000, which is why you're seeing it in the sitemap.xml file it generates.
If you run bundle exec jekyll build instead that will build your site and use whatever domain is currently assigned to url in your _config.yml. If you're hosting on GitHub Pages I'm pretty it sets it for you automatically in the case you omitted it.
Oops. Just understood. That serving caused to render it in localhost. Excuse the beginner question.
Thanks anway! :)
And Man! Thanks for such a nice theme.
Hey @mmistakes ,
I have actually exactly this problem. I want to "fire up" my server on my hosting-server and the url is overwritten by localhost.
So I just got it working with this workaround:
And if I want to update the page in the future I just need to build it again.
It works, but seems a bit odd to me. Well I'm not a web-dev, but shouldn't it work with just firing up the server?
@bastoGrande That's is a question for core Jekyll and has nothing to do with the theme.
As stated above they built in some logic to override site.url to localhost:4000 when starting a development server, since that's what you likely want locally when testing. When you run jekyll build it doesn't do that and will uses whatever values you've assigned for url in your _config.yml.
If you want to disable that behavior when running a local jekyll serve you need to use environment variables. See the official docs, but essentially you run JEKYLL_ENV=prod jekyll serve to force production instead of the default development.
Most helpful comment
Oops. Just understood. That serving caused to render it in localhost. Excuse the beginner question.
Thanks anway! :)
And Man! Thanks for such a nice theme.