If you edit _config.yml
and you are using --watch
, you need to restart the command to apply the changes.
$ jekyll build
# The current site folder will be built into the ./_site directory
$ jekyll build --destination /var/www/
# The current site folder will be generated into /var/www/
$ jekyll build --watch
# The current site folder will be built into the ./_site directory and will be kept up to date with the source until you press CTRL+C to kill the process
you can set a Jekyll environment and value, when build time
JEKYLL_ENV=production jekyll b
JEKYLL_ENV=production jekyll build
JEKYLL_ENV=production bundle exec jekyll build
if your code contains the bellow snippet, analytics.html
will not be included unless your building with JEKYLL_ENV=production
{% if jekyll.environment == "production" %} {% include analytics.html %} {% endif %}