Change to markdown blog posts
This commit is contained in:
parent
04c63f163e
commit
d095710eb0
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue