Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

jekyll serve should respect site.baseurl by default #2072

Closed
tomer opened this Issue · 4 comments

3 participants

@tomer

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
Owner

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
Owner

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

@penibelst

@jekyll/owners: can be closed.

@parkr parkr closed this
@parkr
Owner

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.