diff options
-rw-r--r-- | Makefile | 5 | ||||
-rwxr-xr-x | hooks/post-receive | 4 |
2 files changed, 9 insertions, 0 deletions
@@ -27,6 +27,11 @@ rst: validate printf '<div class="paragraph datelastedit"><p>Last edited: %s</p></div>\n' \ "$(shell date '+%F %T %Z')" >> "$(DEST)" +md: validate + cmark --to html "$(SRC)" > "$(DEST)" + printf '<div class="paragraph datelastedit"><p>Last edited: %s</p></div>\n' \ + "$(shell date '+%F %T %Z')" >> "$(DEST)" + src: if [ ! -d obj ]; then mkdir obj; fi cc $(CCOPTS) src/common.c -c -o obj/common.o diff --git a/hooks/post-receive b/hooks/post-receive index 78c0bd4..6269af4 100755 --- a/hooks/post-receive +++ b/hooks/post-receive @@ -15,6 +15,10 @@ for i in ${FILES_E[*]} ${FILES_A[*]} ${FILES_M[*]}; do dest="${_web}/html/$(basename ${i%.*}).html" make rst SRC="${i}" DEST="${dest}" + elif [ "${i##*.}" = 'md' ]; then + dest="${_web}/html/$(basename ${i%.*}).html" + make md SRC="${i}" DEST="${dest}" + elif [ "$(dirname ${i})" = 'src' ]; then recompile=1 |