You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
592 B
Makefile
31 lines
592 B
Makefile
6 years ago
|
# find all .md files in the directory
|
||
|
# mdsrc=$(shell ls *.md)
|
||
|
mdsrc=$(shell find . -iname "*.md")
|
||
|
# mdsrc=$(wildcard *.md */*.md **/*.md )
|
||
|
# map *.mp => *.html for mdsrc
|
||
|
html_from_md=$(mdsrc:%.md=%.html)
|
||
|
|
||
|
all: $(html_from_md)
|
||
|
|
||
|
fixnames:
|
||
|
rename "s/ /_/g" *
|
||
|
|
||
|
today:
|
||
|
touch `date +"%Y-%m-%d.md"`
|
||
|
|
||
|
now_folder:
|
||
|
mkdir `date +"%Y-%m-%d-%H%M%S"`
|
||
|
|
||
|
# Implicit rule to know how to make .html from .md
|
||
|
%.html: %.md
|
||
|
pandoc --from markdown \
|
||
|
--to html \
|
||
|
--standalone \
|
||
|
--smart \
|
||
|
--section-divs \
|
||
|
--css styles.css \
|
||
|
$< -o $@
|
||
|
# special rule for debugging variables
|
||
|
print-%:
|
||
|
@echo '$*=$($*)'
|