summaryrefslogtreecommitdiff
path: root/docs/_scripts
diff options
context:
space:
mode:
authorRasmus Andersson <rasmus@notion.se>2018-09-27 19:13:49 +0300
committerRasmus Andersson <rasmus@notion.se>2018-10-11 09:38:22 +0300
commit5bc7754354ba8d683e584672189980864e7daec2 (patch)
tree9becb81c7c0d39d31b30e202a0766976a059cd8c /docs/_scripts
parentc518e490bb7ccd923deac66e2cf4ae8cf0f3614d (diff)
downloadinter-5bc7754354ba8d683e584672189980864e7daec2.tar.xz
web: fix dev "serve" script
Diffstat (limited to 'docs/_scripts')
-rwxr-xr-xdocs/_scripts/serve.sh23
1 files changed, 6 insertions, 17 deletions
diff --git a/docs/_scripts/serve.sh b/docs/_scripts/serve.sh
index 27d51b607..02ad6f465 100755
--- a/docs/_scripts/serve.sh
+++ b/docs/_scripts/serve.sh
@@ -7,23 +7,12 @@ if [ ! -s lab/fonts ]; then
ln -fs ../../build/fonts lab/fonts
fi
-# jekyll is a little dumb and resolves the lab/fonts symlink and copies
-# all font files to _site when started. Bad jekyll.
-# Let's work around that.
+# need to delete generated content so that jekyll, being a little dumb,
+# can manage to copy the font files into there again.
+# Why not a symlink you ask? Jekyll traverses it and copies the content.
+# In the past we tried to work around this by periodically removing the
+# copied font files and re-creating the symlink, but it was a frail process.
+# For live testing with fonts, you'll instead want to use docs/lab/serve.py
rm -rf _site
-sh <<_EOF_ &
-N=3
-while [ \$N -gt 0 ]; do
- sleep 1
- mkdir -p _site/lab
- if [ -d _site/lab/fonts ]; then
- rm -rf _site/lab/fonts
- else
- rm -f _site/lab/fonts
- fi
- ln -fs ../../../build/fonts _site/lab/fonts
- let N=N-1
-done
-_EOF_
jekyll serve --limit_posts 20 --watch --host 127.0.0.1 --port 3002