summaryrefslogtreecommitdiff
path: root/slidy/Makefile
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2020-01-10 16:35:26 +0100
committerJonas Smedegaard <dr@jones.dk>2020-01-10 16:35:45 +0100
commit3960448da409263b381b1c38228087bd21d1b3b8 (patch)
tree51713c4389f0b8253791f4e6b4958394503ef76f /slidy/Makefile
parent4eaae29fc5663a3915c4614a6b01dcbbdf86ae2f (diff)
isolate local styling on separate overridable file
Diffstat (limited to 'slidy/Makefile')
-rw-r--r--slidy/Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/slidy/Makefile b/slidy/Makefile
index 5c066f1..5372f6b 100644
--- a/slidy/Makefile
+++ b/slidy/Makefile
@@ -1,12 +1,19 @@
pandoc_sources := $(wildcard *.mkd)
presentations = $(pandoc_sources:%.mkd=%/index.html)
-#aux = slidy.css
all: $(presentations)
# TODO: use --offline when working with Debian packaging of Pandoc
# FIXME: only add local stylesheet if it already exist in target dir
-$(presentations): %/index.html : %.mkd
+$(presentations): %/index.html : %.mkd %/local.css
mkdir -p $(dir $@)
pandoc --from Markdown --to Slidy -o $@ -s -c local.css $<
perl -i -pe 's{https?://www.w3.org/Talks/Tools/Slidy2/(?:styles|scripts)/(slidy.(?:css|js))(?:\.gz)?}{../../../slidy/$$1}g' $@
+
+%/local.css: $(firstword $(wildcard local.scss local.css) ../../slidy/local.css)
+#%/local.css: local.scss
+#%/local.css: $(wildcard local.scss)
+ $(if $(filter %.scss,$<),\
+ rm --force $@ && \
+ sassc --load-path /usr/share/sass/stylesheets --style compressed $< $@,\
+ ln --force --symbolic --target-directory=$* ../$<)