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'. ```
This commit is contained in:
committed by
Simon Michael
parent
c0ce7ca3df
commit
1f0dc89123
2
Makefile
2
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user