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 to http://localhost:4000

Actual result:

  • {{ site.url }}s resolved to the production value in _config.yml

Questions

  • Does jekyll serve set more settings than just the JEKYLL_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

Most upvoted comments

@dirtyf has rewarded $90.00 to @seekingmeaning. See it on IssueHunt

  • πŸ’° Total deposit: $100.00
  • πŸŽ‰ Repository reward(0%): $0.00
  • πŸ”§ Service fee(10%): $10.00

@JasonYao yeah it would make sense to match the serve behavior, but it isn’t currently supported for the build 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.