Skip to content

Instantly share code, notes, and snippets.

@artyom
Created January 14, 2012 12:32
Show Gist options
  • Save artyom/1611271 to your computer and use it in GitHub Desktop.
Save artyom/1611271 to your computer and use it in GitHub Desktop.
make site from markdown files (using "Discount" markdown implementation)
MAKEFLAGS := -j
MDFILES := $(shell find . -name '*.md' -type f)
HTMLS := $(patsubst %.md,%.html,$(MDFILES))
TEMPLATE := template.tpl
.PHONY: all clean
all: $(HTMLS)
%.html: %.md $(TEMPLATE)
theme -E -t $(TEMPLATE) -o $@ $<
clean:
rm -f $(HTMLS)
<!DOCTYPE html>
<meta charset="utf-8"><title><?theme title?></title>
<?theme body?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment