You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stiemap.xml shows localhost:4000 everytime I build. Should we change manually to our repo.github.io domain evertime we push to the remote gh-pages branch?
#918
Closed
3 of 5 tasks
themoralpanda opened this issue
Mar 23, 2017
· 4 comments
I have tested locally with bundle exec jekyll build.
I believe this to be a bug with the theme --- not Jekyll, GitHub Pages or one of the bundled plugins.
Environment informations
Version:
-Minimal mistakes - latest
Operating System - windows
Expected behavior
bundle exec jekyll serve
Builds successfully and generates "sitemap.xml".
But sitemap.xml has all localhost:4000
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.
The text was updated successfully, but these errors were encountered:
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.
@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.
yesterz
pushed a commit
to yesterz/yesterz.github.io-test
that referenced
this issue
Aug 16, 2023
bundle update.bundle exec jekyll build.Environment informations
Version:
-Minimal mistakes - latest
Expected behavior
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.
The text was updated successfully, but these errors were encountered: