-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdebug_webserver
More file actions
executable file
·21 lines (19 loc) · 921 Bytes
/
debug_webserver
File metadata and controls
executable file
·21 lines (19 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
[ -z "$SERVER" ] && SERVER="hagrid.sb.litts.net"
# Install one level above the served directory
# Start the Jekyll debug webserver with livereload support (changes refresh a connected browser)
# This should NOT be exposed to the internet; it's a low-performance server, but works well
# for verifying edits.
# Changes to _config.yml require restart.
# If server doesn't start, check for open files (the name will be in the huge traceback)
[ -n "$DEBUG" ] && DEBUG="-V --trace"
cd "$(dirname "$0")"
[ -d docs ] && cd docs
# The server may crash randomly if LC_ALL isn't set
# --incremental seems to have a ruby issue to be tracked-down later, maybe.
INCREMENTAL="--incremental"
INCREMENTAL=
# LIVE has issues with my version of Ruby
LIVE='--livereload true --livereload-ignore "*#*,*~*,.*,*.swp"'
LIVE=
LC_ALL=en_US.utf8 LANG=en_US.utf8 bundle exec jekyll serve $INCREMENTAL -H "$SERVER" -P 4000 $LIVE $DEBUG