главная|main page

состояние|status

блог|blog

файлы|files

программы|software

summaryrefslogtreecommitdiff
path: root/bb.sh
diff options
context:
space:
mode:
authorCarlos Bautista <carlosbm@gmail.com>2013-04-02 16:52:11 +0200
committerCarlos Bautista <carlosbm@gmail.com>2013-04-02 16:52:11 +0200
commitcb5e388f1e554280d11615b7866a6b79669ea6eb (patch)
treec5eae0e0700933ca44772f1a91f1903cc713ac72 /bb.sh
parentcae7d16376ec190cb122a2a7e65a46ef1345c203 (diff)
Added disqus support
Diffstat (limited to 'bb.sh')
-rwxr-xr-xbb.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/bb.sh b/bb.sh
index 1b9f5e6..fa308f3 100755
--- a/bb.sh
+++ b/bb.sh
@@ -90,6 +90,8 @@
global_config=".config"
global_variables() {
+ if [[ -z $EDITOR ]]; then EDITOR=vim; fi
+
global_software_name="BashBlog"
global_software_version="1.5.1"
@@ -191,8 +193,8 @@ edit() {
#
# $1 the post URL
twitter() {
- echo "<p id='twitter'>$template_comments &nbsp;"
- echo "<a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-text=\"$template_twitter_comment\" data-url=\"$1\""
+ echo "<p id='twitter'> <a href=\"$1#disqus_thread\">$template_comments</a> &nbsp;"
+ echo "<a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-text=\"&lt;Type your comment here but please leave the URL so that other people can follow the comments&gt;\" data-url=\"$1\""
if [ "$global_twitter_username" != "" ]; then
echo " data-via=\"$global_twitter_username\""
@@ -262,10 +264,15 @@ create_html_page() {
fi
echo '</div>' >> "$filename" # content
+ echo ${filename%.*.*}
+ if [[ ${filename%.*.*} != "index" && ${filename%.*.*} != "all_posts" ]]; then
+ cat disqus >> "$filename"
+ fi
# page footer
cat .footer.html >> "$filename"
# close divs
echo '</div></div>' >> "$filename" # divbody and divbodyholder
+ cat disqus_footer >> "$filename"
echo '</body></html>' >> "$filename"
}