Last active
January 5, 2023 08:02
-
-
Save markandrus/d5116bc621ca641acd33 to your computer and use it in GitHub Desktop.
Makefile to convert a directory of Markdown sources to HTML
This file contains hidden or 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
SRC_MD_FILES=$(shell find src -name \*.md) | |
MD_FILES=$(SRC_MD_FILES:src/%=%) | |
HTML_FILES=$(MD_FILES:.md=.html) | |
BUILD_HTML_FILES=$(HTML_FILES:%=build/%) | |
all: $(BUILD_HTML_FILES) | |
build/%.html: src/%.md | |
mkdir -p $$(dirname $@) | |
pandoc -o $@ $? | |
clean: | |
rm -rf build | |
.PHONY: clean |
Author
markandrus
commented
May 15, 2015
@markandrus
Thanks, I am using this makefile
@markandrus
Is there a way to generate a sitemap.html
?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment