From: Mark Szymanski Date: Tue, 16 Nov 2010 02:42:36 +0000 (-0600) Subject: Added support for Textile formatting in newpost() X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=415d8b7458f6d77c072fc1cecdd7761008666b18;p=common%2Fbash_it.git Added support for Textile formatting in newpost() --- diff --git a/plugins/jekyll.plugins.bash b/plugins/jekyll.plugins.bash index ef8888c..9b0d5c1 100644 --- a/plugins/jekyll.plugins.bash +++ b/plugins/jekyll.plugins.bash @@ -11,11 +11,10 @@ newpost() { FNAME_DATE=$(date "+%Y-%m-%d") # If the user is using markdown formatting, let them choose what type of post they want. Sort of like Tumblr. - # TODO: Add support for Textile formatting too. OPTIONS="Text Quote Image Audio Video" - if [[ $JEKYLL_FORMATTING = "markdown" ]] + if [ $JEKYLL_FORMATTING = "markdown" -o $JEKYLL_FORMATTING = "textile" ] then select OPTION in $OPTIONS do @@ -116,12 +115,42 @@ newpost() { if [[ $POST_TYPE = "Audio" ]] then - echo "" >> $FNAME + echo "" >> $FNAME + fi + + if [[ $POST_TYPE = "Video" ]] + then + echo "" >> $FNAME + fi + fi + + if [[ $JEKYLL_FORMATTING = "textile" ]] + then + if [[ $POST_TYPE = "Text" ]] + then + true + fi + + if [[ $POST_TYPE = "Quote" ]] + then + echo "bq. Quote" >> $FNAME + echo >> $FNAME + echo "— Author" >> $FNAME + fi + + if [[ $POST_TYPE = "Image" ]] + then + echo "!url(alt text)" >> $FNAME + fi + + if [[ $POST_TYPE = "Audio" ]] + then + echo "" >> $FNAME fi if [[ $POST_TYPE = "Video" ]] then - echo "" >> $FNAME + echo "" >> $FNAME fi fi