-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
34 lines (26 loc) · 1.01 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
IMG_FILES := `find source/ -name "*.jpg" -o -name "*.png"`
build-docs: install-docs
@echo "To build the documentation, run install-docs first."
rm -rf dist
mkdir -p dist
node docs.js
for i in "$(IMG_FILES)"; do (cp $$i dist || exit 1); done
cp CNAME dist
reflex:
@echo 'To use this task, `go get github.com/cespare/reflex`'
reflex-docs: reflex install-docs
# for some reason reflex and the build-docs task don't play nicely
which reflex &>/dev/null && ulimit -n 2048 && reflex -r 'source/.*\.md' node docs.js
install-docs:
@echo "To install the packages required for documentation generation, you need npm."
npm install mdoc
start-doc-server:
go run docs-server.go dist &
@echo "You should now be able to generate and view the docs at http://localhost:8080"
stop-doc-server:
pkill -f docs-server
publish-docs: build-docs
git subtree push --prefix dist origin gh-pages
generate-html:
mkdir -p html
for i in source/*.md; do pandoc --from markdown_github --to html < "$$i" > "html/$$(basename $$i).html"; done