Skip to content

Instantly share code, notes, and snippets.

@smhr
Forked from sudarkoff/Makefile.pandoc
Last active April 9, 2016 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smhr/d05d09aeca2a02ef512e59dca304e17e to your computer and use it in GitHub Desktop.
Save smhr/d05d09aeca2a02ef512e59dca304e17e to your computer and use it in GitHub Desktop.
Makefile for converting Markdown to slides using markdown-to-slide and remark.
## Markdown to slides is a command line interface to convert markdown documents to an HTML slideshow.
## Basically, Markdown to slides uses remark to convert your markdown documents to HTML slideshows, i.e. that can be viewed in your favorite modern Web browser.
BUILD_DIR := build
REMARK := markdown-to-slides
MARKDOWN := $(wildcard *.md)
HTML := $(patsubst %.md,$(BUILD_DIR)/%.html,$(MARKDOWN))
.PHONY: all checkdirs html clean
all: checkdirs $(HTML)
checkdirs: $(BUILD_DIR)
html: checkdirs $(HTML)
$(BUILD_DIR):
@mkdir -p $@
# generate HTML files
$(BUILD_DIR)/%.html: %.md
$(REMARK) -d -o $@ $<
clean:
@rm -rf $(BUILD_DIR)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment