blob: 92c2864be558dffe4e26cd13b4781e2bd72f6127 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/bin/sh
#word_counter=$(find ~/blog/content/ -type f -name "*.md" -exec cat {} + | \
#perl -CSD -pe 's/[\p{P}\p{S}\s\p{M}\p{C}\p{Z}]//g; s/$$.*?$$$$.*?$$//g; s/[*#_\-`~=+|><\^]//g; s/\!$$.*?$$$$.*?$$//g' | \
#grep -oP '[\p{Han}a-zA-Z]' | \
#wc -m)
commit_date=$(date +"%Y-%m-%d %H:%M:%S")
cd ~/blog/public || exit 1
hugo --cleanDestinationDir --gc
git add .
git commit -m "auto update: $commit_date"
git push origin main
|