diff --git a/src/freedombone-app-blogstatic b/src/freedombone-app-blogstatic index 3e2ee04e..e9ade471 100755 --- a/src/freedombone-app-blogstatic +++ b/src/freedombone-app-blogstatic @@ -190,8 +190,8 @@ function mesh_install_blogstatic { mkdir -p $rootdir$STATIC_BLOG_PATH fi - if [ ! -d $rootdir$STATIC_BLOG_INSTALL_DIR/content ]; then - mkdir -p $rootdir$STATIC_BLOG_INSTALL_DIR/content + if [ ! -d $rootdir$STATIC_BLOG_INSTALL_DIR/content/images ]; then + mkdir -p $rootdir$STATIC_BLOG_INSTALL_DIR/content/images fi create_pelican_conf $rootdir$STATIC_BLOG_INSTALL_DIR/pelicanconf.py diff --git a/src/freedombone-image-mesh b/src/freedombone-image-mesh index 1d5f2a50..4cae3231 100755 --- a/src/freedombone-image-mesh +++ b/src/freedombone-image-mesh @@ -765,6 +765,10 @@ function setup_ipfs { rm -rf /home/$MY_USERNAME/Public fi + if [ -d /home/$MY_USERNAME/CreateBlog/content/images ]; then + shred -zu /home/$MY_USERNAME/CreateBlog/content/images/* + fi + if [ -d /home/$MY_USERNAME/CreateBlog/content ]; then shred -zu /home/$MY_USERNAME/CreateBlog/content/* if grep -q "THEME=" /home/$MY_USERNAME/CreateBlog/pelicanconf.py; then diff --git a/src/freedombone-mesh-blog b/src/freedombone-mesh-blog index 54abf49a..4b529e00 100755 --- a/src/freedombone-mesh-blog +++ b/src/freedombone-mesh-blog @@ -84,13 +84,11 @@ function view_blog { function new_blog { DATESTR=$(date "+%Y-%m-%d %H:%M:%S") - echo $'Blog Post Title' > ~/.new-blog-entry - echo $'###############' >> ~/.new-blog-entry - echo '' >> ~/.new-blog-entry - echo $":date: ${DATESTR}" >> ~/.new-blog-entry - echo $":author: $(toxid --showuser)" >> ~/.new-blog-entry - echo $':category: default' >> ~/.new-blog-entry - echo $':tags: blog, tag' >> ~/.new-blog-entry + echo $'Title: Blog Post Title' > ~/.new-blog-entry + echo $"Date: ${DATESTR}" >> ~/.new-blog-entry + echo $"Author: $(toxid --showuser)" >> ~/.new-blog-entry + echo $'Category: default' >> ~/.new-blog-entry + echo $'Tags: blog, tag' >> ~/.new-blog-entry echo '' >> ~/.new-blog-entry echo $'Add your text here' >> ~/.new-blog-entry echo '' >> ~/.new-blog-entry @@ -109,7 +107,7 @@ function new_blog { # move to the content directory CURRENT_INDEX=$(cat $CURRENT_BLOG_INDEX) - mv ~/.new-blog-entry $BLOG_CONTENT_PATH/${CURRENT_INDEX}_post.rst + mv ~/.new-blog-entry $BLOG_CONTENT_PATH/${CURRENT_INDEX}_post.md # increment the index CURRENT_INDEX=$((CURRENT_INDEX + 1)) @@ -124,7 +122,7 @@ function edit_blog { fi CURRENT_INDEX=$(cat $CURRENT_BLOG_INDEX) PREVIOUS_INDEX=$((CURRENT_INDEX - 1)) - LAST_BLOG_ENTRY=$BLOG_CONTENT_PATH/${PREVIOUS_INDEX}_post.rst + LAST_BLOG_ENTRY=$BLOG_CONTENT_PATH/${PREVIOUS_INDEX}_post.md if [ ! -f $LAST_BLOG_ENTRY ]; then return fi @@ -138,7 +136,7 @@ function delete_blog { fi CURRENT_INDEX=$(cat $CURRENT_BLOG_INDEX) PREVIOUS_INDEX=$((CURRENT_INDEX - 1)) - LAST_BLOG_ENTRY=$BLOG_CONTENT_PATH/${PREVIOUS_INDEX}_post.rst + LAST_BLOG_ENTRY=$BLOG_CONTENT_PATH/${PREVIOUS_INDEX}_post.md if [ ! -f $LAST_BLOG_ENTRY ]; then return fi