From 7bcce9e7879a49eea7313e58ce97036105d9a344 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 27 Apr 2017 10:00:26 -0700 Subject: [PATCH] tools: site: note hakyll preview issues, add easy auto-reloading rule --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8b083e87e..16ba9d443 100644 --- a/Makefile +++ b/Makefile @@ -897,11 +897,18 @@ site-clean: site/hakyll-std/hakyll-std \ -cd site; hakyll-std/hakyll-std clean # rm -rf site/_site/* -# XXX hakyll watch & preview mostly don't live-update any more +# regenerate html whenever markdown files change (and serve it on port 8000) +# XXX hakyll preview/watch often fail to notice changes in large files +# XXX can get confused when docs are generated concurrently by a Shake command site-preview: site/hakyll-std/hakyll-std \ $(call def-help,site-preview, run a hakyll server to preview the website ) #site/site -cd site; hakyll-std/hakyll-std watch # -h hledger.org +# open a browser on the latest site html and reload the page whenever it changes +site-reload: + (sleep 1; open http://localhost:8001) & + livereloadx -p 8001 --static site/_site + # site-view: site \ # $(call def-help,site-view,\ # \