summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
author53hornet <53hornet@gmail.com>2018-07-15 18:17:51 -0400
committer53hornet <53hornet@gmail.com>2018-07-15 18:17:51 -0400
commit30bca603cbdc3ada6c8cf978f124c2d5348c3b3e (patch)
tree3fb2be9ddd6943e48bf8be5718146fc8c13936f3 /makefile
parentf10ded04350e19377f5c2a904db86c5395d12531 (diff)
downloadmd-site-30bca603cbdc3ada6c8cf978f124c2d5348c3b3e.tar.xz
md-site-30bca603cbdc3ada6c8cf978f124c2d5348c3b3e.zip
Revamped CSS, added per-page backgrounds, added image transfer
Diffstat (limited to 'makefile')
-rw-r--r--makefile51
1 files changed, 34 insertions, 17 deletions
diff --git a/makefile b/makefile
index 6d12cb6..3857b72 100644
--- a/makefile
+++ b/makefile
@@ -1,36 +1,53 @@
MD = $(shell find md/ -type f -name '*.md')
-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))
+JPG = $(shell find md/ -type f -name '*.jpg')
+PNG = $(shell find md/ -type f -name '*.png')
+
+CSS_OUT = $(patsubst md/%.css, html/%.css, $(CSS))
+JPG_OUT = $(patsubst md/%.jpg, html/%.jpg, $(JPG))
+PNG_OUT = $(patsubst md/%.png, html/%.png, $(PNG))
+53HORNET_OUT = $(patsubst md/53hor.net/%.md, html/53hor.net/%.html, $(MD))
+ATC_OUT = $(patsubst md/atc.53hor.net/%.md, html/atc.53hor.net/%.html, $(MD))
.PHONY: all
-all: css 53hor.net atc.53hor.net
+all: css img 53hor.net atc.53hor.net
+
+.PHONY: css
+css: $(CSS_OUT)
+
+html/%.css: md/%.css
+ @echo "css: $< -> $@"
+ @mkdir -p "$(@D)"
+ @cp "$<" "$@"
+
+.PHONY: img
+img: $(JPG_OUT) $(PNG_OUT)
+
+html/%.jpg: md/%.jpg
+ @echo "img: $< -> $@"
+ @mkdir -p "$(@D)"
+ @cp "$<" "$@"
+
+html/%.png: md/%.png
+ @echo "img: $< -> $@"
+ @mkdir -p "$(@D)"
+ @cp "$<" "$@"
.PHONY: 53hor.net
-53hor.net: $(53HORNET_HTML)
+53hor.net: $(53HORNET_OUT)
html/53hor.net/%.html: md/53hor.net/%.md md/53hor.net/nav.html
@echo "53hor.net: $< -> $@"
@mkdir -p "$(@D)"
- @pandoc "$<" -f markdown -t html5 -s --toc --toc-depth=3 -B md/53hor.net/nav.html -c /styles.css -o "$@"
+ @pandoc "$<" -f markdown -t html5 -s --toc --toc-depth=2 -H md/53hor.net/background.html -B md/53hor.net/nav.html -c /styles.css -o "$@"
.PHONY: atc.53hor.net
-atc.53hor.net: $(ATC_HTML)
+atc.53hor.net: $(ATC_OUT)
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=3 -c /styles.css -o "$@"
-
-.PHONY: css
-css: $(CSS_HTML)
-
-html/%.css: md/%.css
- @echo "css: $< -> $@"
- @mkdir -p "$(@D)"
- @cp "$<" "$@"
+ @pandoc "$<" -f markdown -t html5 -s --toc --toc-depth=2 -c /styles.css -o "$@"
clean:
@rm -rf html/