aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/serve.sh
blob: 933f365450b6997bcdb745026553f1f40e81c9ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash

set -o errexit -o nounset -o pipefail

script_name="$( basename -- "${BASH_SOURCE[0]}" )"

case "$#" in
    0) ;;
    1)
        dest_dir="$1"
        ;;
    *)
        echo "usage: $script_name [DEST_DIR]" >&2
        exit 1
esac

bundle exec jekyll serve                    \
    --config _config.yml,_config_dev.yml    \
    ${dest_dir+--destination "${dest_dir}"} \
    --drafts                                \
    --force_polling                         \
    --host 0.0.0.0                          \
    --watch