aboutsummaryrefslogtreecommitdiff
path: root/gen.sh
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-06-26 10:45:11 +0200
committerJoris Guyonvarch2015-06-26 10:45:11 +0200
commitb590ca0aea8bbae34885e98b59bc465c09400ca3 (patch)
tree13a1ede9dce6c63e6b091b04287930ee1888f644 /gen.sh
parentd5ff6672a55f9cd1df63fbed21c02d5bb1d10055 (diff)
Using npm to generate static pages, WIP
Diffstat (limited to 'gen.sh')
-rwxr-xr-xgen.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/gen.sh b/gen.sh
new file mode 100755
index 0000000..9fbf044
--- /dev/null
+++ b/gen.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+MARKDOWN_DIR="Pages"
+MARKDOWN_DIR_LENGTH=$(expr 1 + ${#MARKDOWN_DIR})
+
+HTML_DIR="Html"
+
+
+
+
+SELECTOR="${MARKDOWN_DIR}/**/*.md"
+for FILENAME in $SELECTOR; do
+ WITHOUT_DIR=${FILENAME:$MARKDOWN_DIR_LENGTH}
+ WITHOUT_EXT=${WITHOUT_DIR%.*}
+ HTML_FILENAME="$HTML_DIR/$WITHOUT_EXT.html"
+
+ # echo $FILENAME
+ # echo $HTML_FILENAME
+
+ # echo "pandoc -o $HTML_FILENAME $FILENAME"
+ # pandoc -o "\"$HTML_FILENAME\"" "\"$FILENAME\""
+done
+
+pandoc -o Html/accessoires/eponges.html Pages/accessoires/eponges.md