-
-
Save smhr/d05d09aeca2a02ef512e59dca304e17e to your computer and use it in GitHub Desktop.
Makefile for converting Markdown to slides using markdown-to-slide and remark.
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
## 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