Summary Files Commits Branches @commit @diff @stats
path: root / generate.sh
diff options
context:
space:
mode:
1 files changed, 14 insertions, 0 deletions
-rwxr-xr-xgenerate.sh14
diff --git a/generate.sh b/generate.sh
index 2434378..9c1544a 100755
--- a/generate.sh
+++ b/generate.sh
@@ -26,6 +26,20 @@
rm -f "$GEN_FOLDER/.files"
ssg "$REPO_FOLDER/src" "$GEN_FOLDER" "Syndamia" "https://syndamia.com" >/dev/null
# }}}
+# 1.5 Custom logic - timestamps.txt {{{
+ headc=$(git rev-parse HEAD)
+ if [ ! -f 'timestamps.txt' ] || [ "$headc" != "$(head -1 timestamps.txt)" ]; then
+ echo "$headc" > timestamps.txt
+
+ startTimer
+ for file in $(find "$REPO_FOLDER/src" -type f -regex '.*\(blog\|tutorials\|talks\)/.*md'); do
+ dates=($(git log --reverse --follow --pretty=format:%ad --date="format:%d %B %Y" -- $file))
+ line="./website${file:5:-2}html\t${dates[@]:0:3}\t${dates[@]: -3:3}"
+ echo -e $line >> timestamps.txt
+ done
+ endTimer "timestamps.txt update"
+ fi
+# }}}
# 2. Editing HTML files with AWK {{{
createAWKscript() {
# "librarires"