Fixed bug when $body_begin_file was empty
Added extra line in the footer linking to the github project
This commit is contained in:
parent
ef3e350f29
commit
b004cdbcd8
1 changed files with 6 additions and 3 deletions
9
bb.sh
9
bb.sh
|
@ -64,6 +64,8 @@
|
||||||
#
|
#
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
#
|
#
|
||||||
|
# 2.0.2 Fixed bug when $body_begin_file was empty
|
||||||
|
# Added extra line in the footer linking to the github project
|
||||||
# 2.0.1 Allow personalized header/footer files
|
# 2.0.1 Allow personalized header/footer files
|
||||||
# 2.0 Added Markdown support
|
# 2.0 Added Markdown support
|
||||||
# Fully support BSD date
|
# Fully support BSD date
|
||||||
|
@ -107,7 +109,7 @@ global_config=".config"
|
||||||
# by the 'global_config' file contents
|
# by the 'global_config' file contents
|
||||||
global_variables() {
|
global_variables() {
|
||||||
global_software_name="BashBlog"
|
global_software_name="BashBlog"
|
||||||
global_software_version="2.0.1"
|
global_software_version="2.0.2"
|
||||||
|
|
||||||
# Blog title
|
# Blog title
|
||||||
global_title="My fancy blog"
|
global_title="My fancy blog"
|
||||||
|
@ -342,7 +344,7 @@ create_html_page() {
|
||||||
google_analytics >> "$filename"
|
google_analytics >> "$filename"
|
||||||
echo "</head><body>" >> "$filename"
|
echo "</head><body>" >> "$filename"
|
||||||
# stuff to add before the actual body content
|
# stuff to add before the actual body content
|
||||||
cat "$body_begin_file" >> "$filename"
|
[[ -n "$body_begin_file" ]] && cat "$body_begin_file" >> "$filename"
|
||||||
# body divs
|
# body divs
|
||||||
echo '<div id="divbodyholder">' >> "$filename"
|
echo '<div id="divbodyholder">' >> "$filename"
|
||||||
echo '<div class="headerholder"><div class="header">' >> "$filename"
|
echo '<div class="headerholder"><div class="header">' >> "$filename"
|
||||||
|
@ -649,7 +651,8 @@ create_includes() {
|
||||||
if [[ -f "$footer_file" ]]; then cp "$footer_file" .footer.html
|
if [[ -f "$footer_file" ]]; then cp "$footer_file" .footer.html
|
||||||
else
|
else
|
||||||
protected_mail="$(echo "$global_email" | sed 's/@/\@/g' | sed 's/\./\./g')"
|
protected_mail="$(echo "$global_email" | sed 's/@/\@/g' | sed 's/\./\./g')"
|
||||||
echo '<div id="footer">'$global_license '<a href="'$global_author_url'">'$global_author'</a> — <a href="mailto:'$protected_mail'">'$protected_mail'</a></div>' >> ".footer.html"
|
echo '<div id="footer">'$global_license '<a href="'$global_author_url'">'$global_author'</a> — <a href="mailto:'$protected_mail'">'$protected_mail'</a><br/>' >> ".footer.html"
|
||||||
|
echo 'Generated with <a href="https://github.com/cfenollosa/bashblog">bashblog</a>, a single bash script to easily create blogs like this one</div>' >> ".footer.html"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue