jekyll serve should respect site.baseurl by default #2072

tomer opened this Issue Feb 19, 2014 · 4 comments


None yet
4 participants

tomer commented Feb 19, 2014

According to the documentation, if baseurl isn't empty, users would get into problems when running jekyll serve locally, because they the pages will live on http://localhost:4000/project-name and not on http://localhost:4000 as expected.

The current workaround is to pass the --baseurl parameter while running jekyll serve, which I guess people forget sometimes, and it makes following the documentation more difficult.

Because the server as nothing beside the /project-name when site.baseurl is set, I suggest setting up an redirection from http://localhost:4000/ to http://localhost:4000/{{ site.baseurl }}. This way, you could remove that workaround, users will have one less step to follow, and it won't affect external resources which could break if running locally with a different baseurl.


parkr commented Feb 19, 2014

I suppose I ought to update the documentation, then! What ought to be expected is that if you set the baseurl to project-name, you go to http://localhost:4000/project-name to mimic the way GitHub Pages hosts project pages.

A redirect is a sane idea if we can do it all within WEBrick. Know how?


parkr commented Feb 25, 2014

What if we generated the site into a subfolder in _site?


penibelst commented May 12, 2014

@jekyll/owners: can be closed.

parkr closed this May 12, 2014


parkr commented May 12, 2014

The output of jekyll serve should not aid in this.

jekyllbot locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.