projects
/
website.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af22917
)
added gen_posts
author
MatthewOwens
<matthew@owens.tech>
Fri, 17 Jul 2020 20:15:14 +0000
(21:15 +0100)
committer
MatthewOwens
<matthew@owens.tech>
Fri, 17 Jul 2020 20:15:14 +0000
(21:15 +0100)
scripts/gen_post.sh
[new file with mode: 0755]
patch
|
blob
diff --git a/scripts/gen_post.sh
b/scripts/gen_post.sh
new file mode 100755
(executable)
index 0000000..
c4aa79e
--- /dev/null
+++ b/
scripts/gen_post.sh
@@ -0,0
+1,11
@@
+#!/bin/sh
+
+[ $# -ne 1 ] && exit 1
+
+title=$(scripts/post_title.sh $1)
+
+# since $title will have a closing HTML tag, we need to use a different
+# seperator to '/' for sed
+sed "s|TITLE|$title|" includes/head.html
+cat includes/header.html
+markdown $1