Skip to content


Subversion checkout URL

You can clone with
Download ZIP


jekyll serve should respect site.baseurl by default #2072

tomer opened this Issue · 4 comments

3 participants


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.


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?


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


@jekyll/owners: can be closed.

@parkr parkr closed this

The output of jekyll serve should not aid in this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.