summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author53hornet <53hornet@gmail.com>2018-07-09 23:03:12 -0400
committer53hornet <53hornet@gmail.com>2018-07-09 23:03:12 -0400
commitcd7cb6c9089e9029fd86a8a5b260fe2fa66ce995 (patch)
tree703126308a5c6371cc190a93ad8bc65026ed58b7
parentd2199166c4bd244eb8727014db80b62ad1d1b70d (diff)
downloadmd-site-cd7cb6c9089e9029fd86a8a5b260fe2fa66ce995.tar.xz
md-site-cd7cb6c9089e9029fd86a8a5b260fe2fa66ce995.zip
Makefile generates standalone html for all markdown in all subdirs.
-rw-r--r--.gitignore3
-rw-r--r--makefile14
-rw-r--r--md/53hor.net/db/index.md (renamed from 53hor.net/md/index.md)0
-rw-r--r--md/53hor.net/gallery/index.md (renamed from atc.53hor.net/md/index.md)0
-rw-r--r--md/53hor.net/include/nav.inc1
-rw-r--r--md/53hor.net/index.md1
-rw-r--r--md/53hor.net/tidbits/index.md (renamed from macon.53hor.net/md/index.md)0
-rw-r--r--notes.txt4
8 files changed, 22 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 5236e1e..bfea4fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
*~
-
+html
+html/
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/53hor.net/md/index.md b/md/53hor.net/db/index.md
index e69de29..e69de29 100644
--- a/53hor.net/md/index.md
+++ b/md/53hor.net/db/index.md
diff --git a/atc.53hor.net/md/index.md b/md/53hor.net/gallery/index.md
index e69de29..e69de29 100644
--- a/atc.53hor.net/md/index.md
+++ b/md/53hor.net/gallery/index.md
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/macon.53hor.net/md/index.md b/md/53hor.net/tidbits/index.md
index e69de29..e69de29 100644
--- a/macon.53hor.net/md/index.md
+++ b/md/53hor.net/tidbits/index.md
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
+-