summary refs log tree commit diff
path: root/site.mk
diff options
context:
space:
mode:
authorMarc Chantreux <khatar@phear.org>2015-09-15 13:33:29 +0200
committerMarc Chantreux <khatar@phear.org>2015-09-15 13:33:29 +0200
commita457b308c39c90efceda981ddb867ea6f32f3f20 (patch)
tree2ab603458dfe0b7bff8db261afc175059dc5d0b8 /site.mk
downloadspore.github.io-a457b308c39c90efceda981ddb867ea6f32f3f20.tar.gz
examples from eiro.github.com
Diffstat (limited to 'site.mk')
-rw-r--r--site.mk22
1 files changed, 22 insertions, 0 deletions
diff --git a/site.mk b/site.mk
new file mode 100644
index 0000000..df9d895
--- /dev/null
+++ b/site.mk
@@ -0,0 +1,22 @@
+.POSIX:
+.SUFFIXES: .md .html .json
+SHELL=/bin/zsh
+
+mdpages  = $(wildcard *.md)
+webpages = ${mdpages:.md=.html}
+template_html=$(depth)/template.html5
+keywords_m4=$(depth)/m4/defs
+basics= $(template_html) $(keywords_m4) menu
+
+# { m4 -I$(depth)/m4 pre defs - |\
+
+htmlify = \
+    { pandoc -Vdepth=$(depth) \
+	--toc --template $(template_html) -s -B menu |\
+	    m4 -I$(depth)/m4 post defs render - }
+
+.md.json: menu
+	m4 $(depth)/defs $<  | pandoc -Vdepth=$(depth) -tjson | json_pp > $@
+
+can_comment  = perl $(depth)/add_comment_links.pl
+