mirror of
https://git.ludikovsky.name/git/fugitive.git
synced 2024-10-05 15:35:29 +02:00
fix live update bug
This commit is contained in:
parent
198bb426fd
commit
2b15d3a984
|
@ -288,6 +288,7 @@ replace_foreach () {
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_article() {
|
generate_article() {
|
||||||
|
temp=`mktemp fugitiveXXXXXX`
|
||||||
art="${1#$articles_dir/}"
|
art="${1#$articles_dir/}"
|
||||||
title=`get_article_title "$art"`
|
title=`get_article_title "$art"`
|
||||||
cat "$templates_dir/article.html" | \
|
cat "$templates_dir/article.html" | \
|
||||||
|
@ -296,7 +297,8 @@ generate_article() {
|
||||||
replace_str "blog_url" "$blog_url" | \
|
replace_str "blog_url" "$blog_url" | \
|
||||||
replace_commit_info "-1" | \
|
replace_commit_info "-1" | \
|
||||||
replace_article_info "$art" | \
|
replace_article_info "$art" | \
|
||||||
sed "/^[[:space:]]*$/d" > "$public_dir/$art.html"
|
sed "/^[[:space:]]*$/d" > "$temp"
|
||||||
|
mv "$temp" "$public_dir/$art.html"
|
||||||
}
|
}
|
||||||
|
|
||||||
regenerate_previous_and_next_article_maybe() {
|
regenerate_previous_and_next_article_maybe() {
|
||||||
|
|
Loading…
Reference in a new issue