jekyll: Cannot override JEKYLL_ENV in `jekyll build`
- I believe this to be a bug, not a question about using Jekyll.
- This is a feature request.
- I am on (or have tested on) macOS 10+
- I was trying to build.
My Reproduction Steps
JEKYLL_ENV=development bundle exec jekyll build
The Output I Wanted
Expected result:
{{ site.url }}
s should resolve tohttp://localhost:4000
Actual result:
{{ site.url }}
s resolved to the production value in_config.yml
Questions
-
Does
jekyll serve
set more settings than just theJEKYLL_ENV
? -
What are the settings required for me to change
jekyll build
to produce a development build and not a production build?
About this issue
- Original URL
- State: open
- Created 7 years ago
- Comments: 16 (11 by maintainers)
Commits related to this issue
- JEKYLL_ENV has no effect with `jekyll build` https://github.com/jekyll/jekyll/issues/6397 — committed to lildude/minima-dude by lildude 6 years ago
- override `url` in development environment in `build` and `serve` Previously this was only the case when running `serve` which caused inconsistencies between running `build` and `serve`. This fixes #... — committed to Crunch09/jekyll by Crunch09 6 years ago
- override `url` in development environment in `build` and `serve` Previously this was only the case when running `serve` which caused inconsistencies between running `build` and `serve`. This fixes #... — committed to jekyll/jekyll by Crunch09 6 years ago
- Issue #6397: Cannot override JEKYLL_ENV in `jekyll build` make both jekyll build and jekyll serve set site.url = http://localhost:4000 when JEKYLL_ENV=="development" — committed to noproblema/jekyll by deleted user 4 years ago
@dirtyf has rewarded $90.00 to @seekingmeaning. See it on IssueHunt
@JasonYao yeah it would make sense to match the
serve
behavior, but it isnβt currently supported for thebuild
command yet./cc @jekyll/build
What Jekyll version are you running? http://localhost:4000 is already the default in development environment since Jekyll 3.3.
JEKYLL_ENV=development bundle exec jekyll build
should default to http://localhost:4000.