Last active
December 15, 2015 10:48
-
-
Save kastaneda/5247836 to your computer and use it in GitHub Desktop.
Holy Grail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sudo apt-get install pandoc | |
MARKDOWN = pandoc --from markdown --to html5 --css style.css --standalone | |
# sudo apt-get install node-less | |
LESS = lessc --compress | |
SOURCE_PAGES = $(shell find . -type f -name '*.md') | |
TARGET_PAGES = $(patsubst %.md,%.html,$(SOURCE_PAGES)) | |
all: $(TARGET_PAGES) style.css | |
%.html: %.md Makefile | |
$(MARKDOWN) $< --output $@ | |
style.css: style.less Makefile | |
$(LESS) $< > $@ | |
clean: | |
rm -f $(TARGET_PAGES) style.css | |
.PHONY: all clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment