live reloading; allow other pages
This commit is contained in:
20
Makefile
20
Makefile
@@ -1,5 +1,19 @@
|
|||||||
index.html: index.md index.tmpl
|
all: $(patsubst %.md,%.html,$(wildcard *.md)) Makefile
|
||||||
pandoc index.md --template index.tmpl -o index.html
|
|
||||||
|
|
||||||
watch:
|
watch:
|
||||||
fswatch -0 *.{md,tmpl} | xargs -0 -n1 -I{} make
|
fswatch -0 *.{md,tmpl} | xargs -0 -n1 -I{} make all
|
||||||
|
|
||||||
|
livereload:
|
||||||
|
livereloadx --static .
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(patsubst %.md,%.html,$(wildcard *.md))
|
||||||
|
|
||||||
|
PANDOC = pandoc # --from markdown --to html
|
||||||
|
|
||||||
|
# index.html: index.md index.tmpl
|
||||||
|
# $(PANDOC) --template index.tmpl index.md -o $@
|
||||||
|
|
||||||
|
%.html: %.md index.tmpl
|
||||||
|
$(PANDOC) --template index.tmpl $< -o $@
|
||||||
|
|
||||||
|
|||||||
17
README
17
README
@@ -14,12 +14,25 @@ A. drop link suggestions etc. on the etherpad linked in the site footer
|
|||||||
B. fork the github repo, submit a pull request
|
B. fork the github repo, submit a pull request
|
||||||
C. regular contributors can request commit access
|
C. regular contributors can request commit access
|
||||||
|
|
||||||
Before committing, rebuild the HTML:
|
Before committing, rebuild the HTML (requires pandoc):
|
||||||
|
|
||||||
$ make
|
$ make
|
||||||
|
|
||||||
and include it in your commit.
|
and include it in your commit.
|
||||||
|
|
||||||
To run make on each change, install fswatch and:
|
To rebuild on each file change (requires fswatch):
|
||||||
|
|
||||||
$ make watch
|
$ make watch
|
||||||
|
|
||||||
|
To rebuild and reload the browser page on file change,
|
||||||
|
|
||||||
|
Method 1 (requires livereloadx):
|
||||||
|
|
||||||
|
$ make watch
|
||||||
|
in another window:
|
||||||
|
$ npm install -g livereloadx
|
||||||
|
$ make livereload
|
||||||
|
visit http://localhost:35729
|
||||||
|
|
||||||
|
Method 2 (requires LiveReload):
|
||||||
|
add the site folder in the LiveReload GUI, configure custom command "make", ?
|
||||||
|
|||||||
Reference in New Issue
Block a user