From cd7cb6c9089e9029fd86a8a5b260fe2fa66ce995 Mon Sep 17 00:00:00 2001 From: 53hornet <53hornet@gmail.com> Date: Mon, 9 Jul 2018 23:03:12 -0400 Subject: Makefile generates standalone html for all markdown in all subdirs. --- .gitignore | 3 ++- 53hor.net/md/index.md | 0 atc.53hor.net/md/index.md | 0 macon.53hor.net/md/index.md | 0 makefile | 14 ++++++++++++++ md/53hor.net/db/index.md | 0 md/53hor.net/gallery/index.md | 0 md/53hor.net/include/nav.inc | 1 + md/53hor.net/index.md | 1 + md/53hor.net/tidbits/index.md | 0 notes.txt | 4 ++++ 11 files changed, 22 insertions(+), 1 deletion(-) delete mode 100644 53hor.net/md/index.md delete mode 100644 atc.53hor.net/md/index.md delete mode 100644 macon.53hor.net/md/index.md create mode 100644 md/53hor.net/db/index.md create mode 100644 md/53hor.net/gallery/index.md create mode 100644 md/53hor.net/include/nav.inc create mode 100644 md/53hor.net/index.md create mode 100644 md/53hor.net/tidbits/index.md create mode 100644 notes.txt diff --git a/.gitignore b/.gitignore index 5236e1e..bfea4fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *~ - +html +html/ diff --git a/53hor.net/md/index.md b/53hor.net/md/index.md deleted file mode 100644 index e69de29..0000000 diff --git a/atc.53hor.net/md/index.md b/atc.53hor.net/md/index.md deleted file mode 100644 index e69de29..0000000 diff --git a/macon.53hor.net/md/index.md b/macon.53hor.net/md/index.md deleted file mode 100644 index e69de29..0000000 diff --git a/makefile b/makefile index e69de29..fdadaee 100644 --- a/makefile +++ b/makefile @@ -0,0 +1,14 @@ +MD = $(shell find md/ -type f -name '*.md') +INC = $(shell find md/ -type f -name '*.inc') +HTML_PAGE = $(patsubst md/%.md, html/%.html, $(MD)) +HTML_INCL = $(patsubst md/%.inc, html/%.html, $(INC)) + +.PHONY: all +all: $(HTML_PAGE) + +html/%.html: md/%.md + @mkdir -p "$(@D)" + @pandoc "$<" -s -o "$@" + +clean: + @rm -rf html/ diff --git a/md/53hor.net/db/index.md b/md/53hor.net/db/index.md new file mode 100644 index 0000000..e69de29 diff --git a/md/53hor.net/gallery/index.md b/md/53hor.net/gallery/index.md new file mode 100644 index 0000000..e69de29 diff --git a/md/53hor.net/include/nav.inc b/md/53hor.net/include/nav.inc new file mode 100644 index 0000000..a7fc433 --- /dev/null +++ b/md/53hor.net/include/nav.inc @@ -0,0 +1 @@ +nav here diff --git a/md/53hor.net/index.md b/md/53hor.net/index.md new file mode 100644 index 0000000..353eead --- /dev/null +++ b/md/53hor.net/index.md @@ -0,0 +1 @@ +the rest of the page here diff --git a/md/53hor.net/tidbits/index.md b/md/53hor.net/tidbits/index.md new file mode 100644 index 0000000..e69de29 diff --git a/notes.txt b/notes.txt new file mode 100644 index 0000000..8b1eed5 --- /dev/null +++ b/notes.txt @@ -0,0 +1,4 @@ +- create necessary directories/subdirectories for html output +- for every subdirectory in md: + - create html from md and place in appropriate html subdir +- -- cgit v1.2.3