New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't reset site.url to localhost:4000 by default #7253
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as default env is development and that in this context we serve on localhost, no matter what is in the config, I'm 👍
@DirtyF Did you give this branch a test-run locally..? |
@ashmaroli I tested my blog and jekyll's website locally and |
@jekyll: merge +minor |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
If you, like me, have found this ticket while trying to debug |
@ashmaroli looking back at this change, I don't think it was the right move. 🤷 |
If conversation is going to be reopened on whether or not this change was the right move, I'll add my two cents:
When running However, this PR's change leads to problems in the following cases:
To avoid the problem of deploying files with I often run This change doesn't help me, and it doesn't really harm me. All it does is change my default local development command from Whether or not this change is undone, https://jekyllrb.com/docs/configuration/options/#serve-command-options should be updated to:
|
I also just don't quite understand the justification for the change. As @benlk mentions, in either case it would be helpful to clarify the documentation. |
Documentation should be updated when major changes like this occur. The variables documentation makes some promises about the behavior of site.url that are no longer true. |
I have filed a PR to revert these changes: #8620 Sorry for the delay in getting them to you. |
Revert jekyll#7253: "Don't reset site.url to localhost:4000 by default" This backports faef38b to 4.2-stable
Upgrading to jekyll 4.2.0 picked up a new feature which causes local development builds to not function the same as before. More details: jekyll/jekyll#8541, jekyll/jekyll#7253
Local tests show that the local preview server is based on
config["host"]
andconfig["port"]
values..So even if
config["url"] == https://jekyllrb.com
, the site will be served at the default setting://127.0.0.1:4000
This simplifies users' workflow by not having to
build
the site again withJEKYLL_ENV=production
(unless their templates are designed to render differently for the two ENV vars, which is a different story altogether)
P.S. The above observation was made on Windows. Please confirm for Unix platforms, if possible.