first
This commit is contained in:
commit
2872dca785
4 changed files with 77 additions and 0 deletions
25
Makefile
Normal file
25
Makefile
Normal file
|
@ -0,0 +1,25 @@
|
|||
TMPDIR ?= _tmp
|
||||
BUILDDIR ?= _build
|
||||
PAGESDIR ?= pages
|
||||
DATADIR ?= data
|
||||
TEMPLATE ?= $(DATADIR)/template.html
|
||||
|
||||
PAGES != find $(PAGESDIR) -name '*.md'
|
||||
OUTPUTPAGES = $(patsubst $(PAGESDIR)/%.md,$(BUILDDIR)/%.html,$(PAGES))
|
||||
|
||||
|
||||
.PHONY: all
|
||||
all: build
|
||||
|
||||
.PHONY: build
|
||||
build: $(OUTPUTPAGES)
|
||||
|
||||
$(BUILDDIR)/%.html: $(PAGESDIR)/%.md $(TEMPLATE)
|
||||
mkdir -p $(dir $@)
|
||||
pandoc -s --toc --template $(TEMPLATE) -o $@ $<
|
||||
|
||||
.PHONY: clean distclean
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)
|
||||
distclean: clean
|
||||
rm -rf $(TMPDIR)
|
Loading…
Add table
Add a link
Reference in a new issue