aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-01-25 14:52:04 +0000
committerAkshay <[email protected]>2020-01-25 14:52:04 +0000
commit313fb789bbc0bf1dcbdff4b258818ec6d895b5a6 (patch)
tree02dd0d132e231a8e806537cb2dccbb2517fe83ce
parent392653ee25a393eae99d96f1299bb4e2a012fc4e (diff)
add commit id to posts
-rwxr-xr-xgenerate.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/generate.sh b/generate.sh
index 5399b3a..ee08a4b 100755
--- a/generate.sh
+++ b/generate.sh
@@ -62,12 +62,21 @@ for f in $posts; do
62 62
63 # generate posts 63 # generate posts
64 html=$(lowdown "$file") 64 html=$(lowdown "$file")
65 commit="$(git log -n1 --oneline "$file" | sed -e 's/\s.*$//g')"
65 post_title=$(title_wrapper "$id") 66 post_title=$(title_wrapper "$id")
66 post_date=$(date -r "$file" "+%d/%m %Y") 67 post_date=$(date -r "$file" "+%d/%m %Y")
67 post_link=$(link_wrapper "${id%.*}" "$post_title" "$post_date") 68 post_link=$(link_wrapper "${id%.*}" "$post_title" "$post_date")
68 69
69 echo -ne "$post_link" >> docs/index.html 70 echo -ne "$post_link" >> docs/index.html
70 esh -s /bin/bash -o "docs/posts/${id%.*}.html" "./post.esh" file="$file" date="$post_date" title="$post_title" 71
72 esh -s /bin/bash \
73 -o "docs/posts/${id%.*}.html" \
74 "./post.esh" \
75 file="$file" \
76 date="$post_date" \
77 commit="$commit" \
78 title="$post_title"
79
71 first_visible="0" 80 first_visible="0"
72done 81done
73 82