diff options
Diffstat (limited to 'generate.sh')
-rwxr-xr-x | generate.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/generate.sh b/generate.sh index 78c6331..b9b3541 100755 --- a/generate.sh +++ b/generate.sh | |||
@@ -84,10 +84,10 @@ echo -ne "$(intro)<table>" >> ./docs/index.html | |||
84 | # posts | 84 | # posts |
85 | posts=$(ls -t ./posts) | 85 | posts=$(ls -t ./posts) |
86 | mkdir -p docs/posts | 86 | mkdir -p docs/posts |
87 | rm -rf "./docs/posts/" | ||
87 | 88 | ||
88 | for f in $posts; do | 89 | for f in $posts; do |
89 | file="./posts/"$f | 90 | file="./posts/"$f |
90 | echo "generating post $file" | ||
91 | id="${file##*/}" # ill name my posts just fine | 91 | id="${file##*/}" # ill name my posts just fine |
92 | 92 | ||
93 | # generate posts | 93 | # generate posts |
@@ -100,6 +100,7 @@ for f in $posts; do | |||
100 | height="$(height $lines)" | 100 | height="$(height $lines)" |
101 | 101 | ||
102 | post_title=$(title_wrapper "$id") | 102 | post_title=$(title_wrapper "$id") |
103 | echo "[~] $post_title" | ||
103 | post_date=$(date -r "$file" "+%d/%m — %Y") | 104 | post_date=$(date -r "$file" "+%d/%m — %Y") |
104 | post_link=$(link_wrapper "${id%.*}" "$post_title" "$post_date" "$r_time" "$height") | 105 | post_link=$(link_wrapper "${id%.*}" "$post_title" "$post_date" "$r_time" "$height") |
105 | echo -ne "$post_link" >> docs/index.html | 106 | echo -ne "$post_link" >> docs/index.html |
@@ -123,8 +124,6 @@ esh -s /bin/bash \ | |||
123 | -o "./docs/index.xml" \ | 124 | -o "./docs/index.xml" \ |
124 | "rss.esh" | 125 | "rss.esh" |
125 | 126 | ||
126 | |||
127 | |||
128 | cat >> ./docs/index.html << EOF | 127 | cat >> ./docs/index.html << EOF |
129 | </table> | 128 | </table> |
130 | <div class="separator"></div> | 129 | <div class="separator"></div> |