aboutsummaryrefslogtreecommitdiff
path: root/scripts/generate_index_html.sh
diff options
context:
space:
mode:
authorKenny Ballou <kballou@devnulllabs.io>2018-08-17 22:30:27 -0600
committerKenny Ballou <kballou@devnulllabs.io>2018-08-19 08:11:29 -0600
commitc818f2b61c75195cf7adb542dd443e37feea7b59 (patch)
tree6f7c89e834e1973209187abd668eaa360cb367a6 /scripts/generate_index_html.sh
parent28da2aee6b587e751d1ee60d9da80d9c9f200181 (diff)
downloadblog.kennyballou.com-c818f2b61c75195cf7adb542dd443e37feea7b59.tar.gz
blog.kennyballou.com-c818f2b61c75195cf7adb542dd443e37feea7b59.tar.xz
Convert to Org-mode and Pandoc
Create some fairly straight-forward conversion scripts to generate a static site from Emacs Org-mode files using Pandoc to generate HTML files.
Diffstat (limited to 'scripts/generate_index_html.sh')
-rwxr-xr-xscripts/generate_index_html.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/generate_index_html.sh b/scripts/generate_index_html.sh
new file mode 100755
index 0000000..0a2196a
--- /dev/null
+++ b/scripts/generate_index_html.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+# Generate index.html page
+
+INPUT_FILES=${@}
+PROJ_ROOT=$(git rev-parse --show-toplevel)
+source ${PROJ_ROOT}/scripts/site-templates.sh
+
+cat "${HTML_HEADER_FILE}"
+echo "<body>"
+cat "${HTML_SUB_HEADER_FILE}"
+cat ${INPUT_FILES} | sort -r -n -k1 -k2 -k3 | awk -F' ' '{print $4}'
+echo "</body>"
+cat "${HTML_FOOTER_FILE}"