summaryrefslogtreecommitdiff
path: root/html-gen.sh
diff options
context:
space:
mode:
Diffstat (limited to 'html-gen.sh')
-rw-r--r--html-gen.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/html-gen.sh b/html-gen.sh
index a98a1d7..406da7f 100644
--- a/html-gen.sh
+++ b/html-gen.sh
@@ -330,6 +330,9 @@ for f in $added_files $modified_files; do
echo -n " $f... "
generate_article "$f"
echo "done."
+ echo -n "[fugitive] Generating $public_dir/${f#$articles_dir/}.html.gz... "
+ gzip -9k $public_dir/${f#$articles_dir/}.html
+ echo "done."
echo "${f#$articles_dir/}" >> "$generated_files"
fi
done
@@ -339,6 +342,7 @@ for f in $added_files; do
art="${f#$articles_dir/}"
echo -n "[fugitive] Adding $public_dir/$art.html to git ignore list... "
echo "$public_dir/$art.html" >> .git/info/exclude
+ echo "$public_dir/$art.html.gz" >> .git/info/exclude
echo "done."
previous=`get_article_previous_file "$art"`
next=`get_article_next_file "$art"`
@@ -353,8 +357,12 @@ for f in $deleted_files; do
echo -n "[fugitive] Deleting $public_dir/$art.html... "
rm "$public_dir/$art.html"
echo "done."
+ echo -n "[fugitive] Deleting $public_dir/$art.html.gz... "
+ rm "$public_dir/$art.html.gz"
+ echo "done."
echo -n "[fugitive] Removing $art.html from git ignore list... "
sed -i "/^$public_dir\/$art.html$/d" .git/info/exclude
+ sed -i "/^$public_dir\/$art.html.gz$/d" .git/info/exclude
echo "done."
previous=`get_deleted_previous_file "$art"`
next=`get_deleted_next_file "$art"`
@@ -376,6 +384,7 @@ if [ $modification -gt 0 ]; then
replace_commit_info "-1" | \
sed "/^[[:space:]]*$/d" > "$temp"
cp "$temp" "$public_dir/archives.html"
+ gzip -9k "$public_dir/archives.html"
echo "done."
echo -n "[fugitive] Generating $public_dir/rss.xml... "
last_5_articles=`mktemp fugitiveXXXXXX`
@@ -391,6 +400,7 @@ if [ $modification -gt 0 ]; then
replace_commit_info "-1" | \
sed "/^[[:space:]]*$/d" > "$temp"
cp "$temp" "$public_dir/rss.xml"
+ gzip -9k "$public_dir/rss.xml"
echo "done."
echo -n "[fugitive] Generating $public_dir/atom.xml... "
last_5_articles=`mktemp fugitiveXXXXXX`
@@ -406,10 +416,12 @@ if [ $modification -gt 0 ]; then
replace_commit_info "-1" | \
sed "/^[[:space:]]*$/d" > "$temp"
cp "$temp" "$public_dir/atom.xml"
+ gzip -9k "$public_dir/atom.xml"
echo "done."
rm "$last_5_articles" "$last_5_commits" "$temp"
echo -n "[fugitive] Using last published article as index page... "
cp "$public_dir/`head -1 $articles_sorted`.html" "$public_dir/index.html"
+ gzip -9k "$public_dir/index.html"
echo "done".
echo "[fugitive] Blog update complete."
fi