updgrading publish function : to be tested
This commit is contained in:
parent
029a99216d
commit
a2285097fe
4
bob
4
bob
@ -81,7 +81,9 @@ publish()
|
||||
{
|
||||
post=$(awk -f ${BOB_LIB}/markdown.awk ./drafts/$1.md)
|
||||
template="${BOB_LIB}/template/post.html"
|
||||
awk -v content="$post" '{gsub(/{{article}}/, content); print}' "$template" > "./posts/$1.html"
|
||||
escaped_post=$(echo "$post" | sed 's/&/\\&/g')
|
||||
# awk -v content="$post" '{gsub(/{{article}}/, content); print}' "$template" > "./posts/$1.html"
|
||||
awk -v content="$escaped_content" '{gsub(/\{\{article\}\}/, content); print}' "template" > "./posts/$1.html"
|
||||
mv ./drafts/$1.md ./drafts/published/$1.md
|
||||
|
||||
update_index
|
||||
|
Loading…
Reference in New Issue
Block a user