summaryrefslogtreecommitdiff
path: root/revealjs/Makefile
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2023-02-20 23:48:04 +0100
committerJonas Smedegaard <dr@jones.dk>2023-02-20 23:48:53 +0100
commitc2d89f2be82480aa8f1a599ca5e87ffb149e762b (patch)
treec9252f3595836be47b5876bf2271f18225a5f6b8 /revealjs/Makefile
parenta94348277170eee783346108b6408028b5e668aa (diff)
add reusable Reveal.js files
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/"$*"