Added support for Textile formatting in newpost()
parent
14c78bff05
commit
415d8b7458
|
|
@ -11,11 +11,10 @@ newpost() {
|
||||||
FNAME_DATE=$(date "+%Y-%m-%d")
|
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.
|
# 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"
|
OPTIONS="Text Quote Image Audio Video"
|
||||||
|
|
||||||
if [[ $JEKYLL_FORMATTING = "markdown" ]]
|
if [ $JEKYLL_FORMATTING = "markdown" -o $JEKYLL_FORMATTING = "textile" ]
|
||||||
then
|
then
|
||||||
select OPTION in $OPTIONS
|
select OPTION in $OPTIONS
|
||||||
do
|
do
|
||||||
|
|
@ -116,12 +115,42 @@ newpost() {
|
||||||
|
|
||||||
if [[ $POST_TYPE = "Audio" ]]
|
if [[ $POST_TYPE = "Audio" ]]
|
||||||
then
|
then
|
||||||
echo "<audio src=\"/path/to/audio/file\" controls=\"controls\"></audio>" >> $FNAME
|
echo "<html><audio src=\"/path/to/audio/file\" controls=\"controls\"></audio></html>" >> $FNAME
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $POST_TYPE = "Video" ]]
|
if [[ $POST_TYPE = "Video" ]]
|
||||||
then
|
then
|
||||||
echo "<video src=\"/path/to/video\" controls=\"controls\"></video>" >> $FNAME
|
echo "<html><video src=\"/path/to/video\" controls=\"controls\"></video></html>" >> $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 "<html><audio src=\"/path/to/audio/file\" controls=\"controls\"></audio></html>" >> $FNAME
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $POST_TYPE = "Video" ]]
|
||||||
|
then
|
||||||
|
echo "<html><video src=\"/path/to/video\" controls=\"controls\"></video></html>" >> $FNAME
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue