summaryrefslogtreecommitdiff
path: root/revealjs/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'revealjs/Makefile')
-rw-r--r--revealjs/Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/revealjs/Makefile b/revealjs/Makefile
new file mode 100644
index 0000000..989f535
--- /dev/null
+++ b/revealjs/Makefile
@@ -0,0 +1,21 @@
+pandoc_sources := $(wildcard *.md)
+presentations = $(pandoc_sources:%.md=%.html)
+
+basedir = ../../..
+core_code_files := reset.css reveal.css theme/black.css reveal.js
+plugin_code_files := notes/notes.js search/search.js zoom/zoom.js
+all_core_code_files = $(core_code_files:%=$(basedir)/revealjs/dist/%)
+all_plugin_code_files = $(plugin_code_files:%=$(basedir)/revealjs/plugin/%)
+
+all: $(presentations)
+
+$(presentations): %.html : %.md $(basedir)/.gitignore \
+ $(all_core_code_files) $(all_plugin_code_files)
+# mkdir -p $(dir $@)
+ pandoc -f commonmark_x -t revealjs --slide-level=2 --standalone -V revealjs-url=$(basedir)/revealjs --resource-path=.. -o "$@" -- "$<"
+
+$(all_core_code_files): $(basedir)/revealjs/dist/%:
+ wget -P revealjs -x -nH --cut-dirs=2 --directory-prefix=$(basedir)/revealjs/dist https://unpkg.com/reveal.js@^4/dist/"$*"
+
+$(all_plugin_code_files): $(basedir)/revealjs/plugin/%:
+ wget -P revealjs -x -nH --cut-dirs=1 --directory-prefix=$(basedir)/revealjs https://unpkg.com/reveal.js@^4/plugin/"$*"