From 1f0dc8912322750dfdbe23ad735b407cc51d8252 Mon Sep 17 00:00:00 2001 From: Felix Crux Date: Tue, 27 Nov 2018 20:19:07 -0500 Subject: [PATCH] Exclude README and CONTRIBUTING from automatic HTML conversion When running `make` to generate the HTML version of the site, all Markdown files are automatically found and converted - including README.md and CONTRIBUTING.md. These two aren't really wanted, and the resulting HTML versions need to be ignored or deleted. It's not sufficient to add them to .gitignore, because they'll still be there in the filesystem causing confusion, even if the risk of committing them to Git is minimized. This change filters them out of the Makefile's argument list of Markdown files that should be automatically converted to HTML, so the unwanted versions don't get generated in the first place. Before: ``` $ make pandoc -f markdown-smart+autolink_bare_uris --template index.tmpl CONTRIBUTING.md -o CONTRIBUTING.html pandoc -f markdown-smart+autolink_bare_uris --template index.tmpl README.md -o README.html ``` After: ``` $ make make: Nothing to be done for 'all'. ``` --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 71bffec..3158218 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ all: html # generate html from all md files -html: $(patsubst %.md,%.html,$(wildcard *.md quickref/*.md)) Makefile +html: $(patsubst %.md,%.html,$(filter-out README.md CONTRIBUTING.md,$(wildcard *.md quickref/*.md))) Makefile PANDOC=pandoc -f markdown-smart+autolink_bare_uris