docs: workarounds for poorly-behaving jekyll
This commit is contained in:
parent
176d2ce540
commit
9a6c2e0202
1 changed files with 18 additions and 1 deletions
|
|
@ -3,7 +3,24 @@ set -e
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
if [ ! -s lab/fonts ]; then
|
if [ ! -s lab/fonts ]; then
|
||||||
ln -s ../../build/dist lab/fonts
|
ln -s ../../build/dist-unhinted lab/fonts
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# jekyll is a little dumb and resolves the lab/fonts symlink and copies
|
||||||
|
# all font files to _site when started. Fix that. Bad jekyll!
|
||||||
|
#
|
||||||
|
# Step 1/2: remove any previous symlink, or jekyll crashes
|
||||||
|
rm -rf _site/lab/fonts
|
||||||
|
#
|
||||||
|
# Step 2/2: create symlink again after some delay. Ugh.
|
||||||
|
sh <<_EOF_ &
|
||||||
|
N=3
|
||||||
|
while [ \$N -gt 0 ]; do
|
||||||
|
sleep 1
|
||||||
|
rm -rf _site/lab/fonts
|
||||||
|
ln -s ../../../build/dist-unhinted _site/lab/fonts
|
||||||
|
let N=N-1
|
||||||
|
done
|
||||||
|
_EOF_
|
||||||
|
|
||||||
jekyll serve --limit_posts 20 --watch --host 127.0.0.1 --port 3002 --open-url
|
jekyll serve --limit_posts 20 --watch --host 127.0.0.1 --port 3002 --open-url
|
||||||
|
|
|
||||||
Reference in a new issue