#!/bin/bash set -eu -o pipefail # Fire up Jekyll with the right configuration run_jekyll() { set -eu # shellcheck disable=SC2155 local args="--config $JEKYLL_CONFIG --trace --verbose" # shellcheck disable=SC2086 bundle exec jekyll build $args # shellcheck disable=SC2155 local args="${args} --host $JEKYLL_HOST --port $JEKYLL_PORT" if [[ $JEKYLL_ENV == "development" ]]; then # shellcheck disable=SC2155 local args="${args} --incremental" fi # shellcheck disable=SC2086 bundle exec jekyll serve $args } # Main entrypoint main() { set -eu run_jekyll } main