diff --git a/bb.sh b/bb.sh index d3d6fe3..cf7cf9b 100755 --- a/bb.sh +++ b/bb.sh @@ -287,21 +287,17 @@ twitter_card() { twitter() { [[ -z $global_twitter_username ]] && return - if [[ -z $global_disqus_username ]]; then - if [[ $global_twitter_cookieless == true ]]; then - id=$RANDOM + if [[ $global_twitter_cookieless == true ]]; then + id=$RANDOM - search_engine="https://twitter.com/search?q=" + search_engine="https://twitter.com/search?q=" - echo "

$template_comments $template_twitter_button " - echo " 

" - return; - else - echo "

$template_comments "; - fi - else - echo "

$template_comments  " - fi + echo "

$template_comments $template_twitter_button " + echo " 

" + return; + else + echo "

$template_comments "; + fi echo "$title" - google_analytics twitter_card "$content" "$title" echo "" # stuff to add before the actual body content @@ -410,14 +405,10 @@ create_html_page() { echo '' # content - # Add disqus commments except for index and all_posts pages - [[ $index == no ]] && disqus_body - # page footer cat .footer.html # close divs echo '' # divbody and divbodyholder - disqus_footer [[ -n $body_end_file ]] && cat "$body_end_file" echo '' } > "$filename" @@ -1071,11 +1062,7 @@ date_version_detect() { # $2 file name of a draft to continue editing (optional) do_main() { # make sure we're in the right directory - [ $(pwd) = $HOME/public_html/blog ] || ( - echo "you're not in your blog directory. moving you there now." - mkdir -p $HOME/public_html/blog - cd $HOME/public_html/blog - ) + [ $(pwd) != $HOME/public_html/blog ] && echo "you're not in your blog directory." && exit # Detect if using BSD date or GNU date date_version_detect