Skip to content
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

Respect environment when defined as part of build command #18

Open
chrissealey opened this issue Mar 17, 2017 · 1 comment
Open

Respect environment when defined as part of build command #18

chrissealey opened this issue Mar 17, 2017 · 1 comment

Comments

@chrissealey
Copy link

Currently—from what I can tell—this plugin is only using the environment defined by Jekyll's config file. It is possible to set an environment as part of your command with JEKYLL_ENV=production; removing the need to change config as you go from development to production, etc.

More information here:
https://jekyllrb.com/docs/configuration/#build-command-options

@captn3m0
Copy link

captn3m0 commented Jun 9, 2023

As a workaround, I'm currently using 2 config files. _config.yml includes env: development, so default jekyll build works as normal (with the plugin disabled).

For prod builds, I have a second prod.yml, which contains env: production. I run the build as JEKYLL_ENV=production jekyll build --config _config.yml,prod.yml to override the environment.

Ideally, the plugin should be disabled on development (default), and only run on production environments, with perhaps a configuration option to list the environments where the plugin should run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants