summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
author53hornet <53hornet@gmail.com>2018-07-10 23:06:59 -0400
committer53hornet <53hornet@gmail.com>2018-07-10 23:06:59 -0400
commitd1a3eb2f1eb59992823d8edb7f0400d67d2818f5 (patch)
tree070524d18535c0f10743346c3e319ec278b82a3b /makefile
parentcd7cb6c9089e9029fd86a8a5b260fe2fa66ce995 (diff)
downloadmd-site-d1a3eb2f1eb59992823d8edb7f0400d67d2818f5.tar.xz
md-site-d1a3eb2f1eb59992823d8edb7f0400d67d2818f5.zip
Updated pandoc, added TOC, added topnav include, split compiles per site
Diffstat (limited to 'makefile')
-rw-r--r--makefile34
1 files changed, 28 insertions, 6 deletions
diff --git a/makefile b/makefile
index fdadaee..b9c25a9 100644
--- a/makefile
+++ b/makefile
@@ -1,14 +1,36 @@
MD = $(shell find md/ -type f -name '*.md')
-INC = $(shell find md/ -type f -name '*.inc')
-HTML_PAGE = $(patsubst md/%.md, html/%.html, $(MD))
-HTML_INCL = $(patsubst md/%.inc, html/%.html, $(INC))
+HTML= $(patsubst md/%.md, html/%.html, $(MD))
+CSS = $(shell find md/ -type f -name '*.css')
+CSS_HTML = $(patsubst md/%.css, html/%.css, $(CSS))
+53HORNET_HTML = $(patsubst md/53hor.net/%.md, html/53hor.net/%.html, $(MD))
+ATC_HTML = $(patsubst md/atc.53hor.net/%.md, html/atc.53hor.net/%.html, $(MD))
.PHONY: all
-all: $(HTML_PAGE)
+all: css 53hor.net atc.53hor.net
-html/%.html: md/%.md
+.PHONY: 53hor.net
+53hor.net: $(53HORNET_HTML)
+
+html/53hor.net/%.html: md/53hor.net/%.md md/53hor.net/include/nav.inc
+ @echo "53hor.net: $< -> $@"
+ @mkdir -p "$(@D)"
+ @pandoc "$<" -f markdown -t html5 -s --toc --toc-depth=2 -B md/53hor.net/include/nav.inc -c /include/styles.css -o "$@"
+
+.PHONY: atc.53hor.net
+atc.53hor.net: $(ATC_HTML)
+
+html/atc.53hor.net/%.html: md/atc.53hor.net/%.md
+ @echo "atc.53hor.net: $< -> $@"
+ @mkdir -p "$(@D)"
+ @pandoc "$<" -f markdown -t html5 -s --toc --toc-depth=2 -c /include/styles.css -o "$@"
+
+.PHONY: css
+css: $(CSS_HTML)
+
+html/%.css: md/%.css
+ @echo "css: $< -> $@"
@mkdir -p "$(@D)"
- @pandoc "$<" -s -o "$@"
+ @cp "$<" "$@"
clean:
@rm -rf html/