Update post2blog.sh

This commit is contained in:
张壹 2018-11-25 14:12:58 -08:00
parent 33f4662eff
commit de058863ca

View File

@ -83,6 +83,7 @@ function dispOptionShort(){
#change initial parameters depending on your own file system
_my_repository_addresses=("/Users/zhangyi/Code/GitHub/YiZhangCUG.github.io" "/Users/zhangyi/Documents/GitHub/YiZhangCUG.github.io")
_repository_address=${_my_repository_addresses[0]}
_author="Yi Zhang"
_posts_address="_posts/" #directory of your posts
_assets_address="assets/" #directory of your assets
_posts_sub_address=`date +"%Y-%m/"` #sub-directory of your posts
@ -262,7 +263,8 @@ echo "---" > ${_outfile}
echo "layout: ${_layout}" >> ${_outfile}
echo "title: \"${_title}\"" >> ${_outfile}
echo "date: ${_nowtime}" >> ${_outfile}
echo "categories: [${_categories}]" >> ${_outfile}
echo "author: ${_author}" >> ${_outfile}
echo "category: ${_categories}" >> ${_outfile}
echo "tags: [${_tags}]" >> ${_outfile}
echo "---" >> ${_outfile}
echo "" >> ${_outfile}