|
@@ -84,13 +84,11 @@ function view_blog {
|
84
|
84
|
function new_blog {
|
85
|
85
|
DATESTR=$(date "+%Y-%m-%d %H:%M:%S")
|
86
|
86
|
|
87
|
|
- echo $'Blog Post Title' > ~/.new-blog-entry
|
88
|
|
- echo $'###############' >> ~/.new-blog-entry
|
89
|
|
- echo '' >> ~/.new-blog-entry
|
90
|
|
- echo $":date: ${DATESTR}" >> ~/.new-blog-entry
|
91
|
|
- echo $":author: $(toxid --showuser)" >> ~/.new-blog-entry
|
92
|
|
- echo $':category: default' >> ~/.new-blog-entry
|
93
|
|
- echo $':tags: blog, tag' >> ~/.new-blog-entry
|
|
87
|
+ echo $'Title: Blog Post Title' > ~/.new-blog-entry
|
|
88
|
+ echo $"Date: ${DATESTR}" >> ~/.new-blog-entry
|
|
89
|
+ echo $"Author: $(toxid --showuser)" >> ~/.new-blog-entry
|
|
90
|
+ echo $'Category: default' >> ~/.new-blog-entry
|
|
91
|
+ echo $'Tags: blog, tag' >> ~/.new-blog-entry
|
94
|
92
|
echo '' >> ~/.new-blog-entry
|
95
|
93
|
echo $'Add your text here' >> ~/.new-blog-entry
|
96
|
94
|
echo '' >> ~/.new-blog-entry
|
|
@@ -109,7 +107,7 @@ function new_blog {
|
109
|
107
|
|
110
|
108
|
# move to the content directory
|
111
|
109
|
CURRENT_INDEX=$(cat $CURRENT_BLOG_INDEX)
|
112
|
|
- mv ~/.new-blog-entry $BLOG_CONTENT_PATH/${CURRENT_INDEX}_post.rst
|
|
110
|
+ mv ~/.new-blog-entry $BLOG_CONTENT_PATH/${CURRENT_INDEX}_post.md
|
113
|
111
|
|
114
|
112
|
# increment the index
|
115
|
113
|
CURRENT_INDEX=$((CURRENT_INDEX + 1))
|
|
@@ -124,7 +122,7 @@ function edit_blog {
|
124
|
122
|
fi
|
125
|
123
|
CURRENT_INDEX=$(cat $CURRENT_BLOG_INDEX)
|
126
|
124
|
PREVIOUS_INDEX=$((CURRENT_INDEX - 1))
|
127
|
|
- LAST_BLOG_ENTRY=$BLOG_CONTENT_PATH/${PREVIOUS_INDEX}_post.rst
|
|
125
|
+ LAST_BLOG_ENTRY=$BLOG_CONTENT_PATH/${PREVIOUS_INDEX}_post.md
|
128
|
126
|
if [ ! -f $LAST_BLOG_ENTRY ]; then
|
129
|
127
|
return
|
130
|
128
|
fi
|
|
@@ -138,7 +136,7 @@ function delete_blog {
|
138
|
136
|
fi
|
139
|
137
|
CURRENT_INDEX=$(cat $CURRENT_BLOG_INDEX)
|
140
|
138
|
PREVIOUS_INDEX=$((CURRENT_INDEX - 1))
|
141
|
|
- LAST_BLOG_ENTRY=$BLOG_CONTENT_PATH/${PREVIOUS_INDEX}_post.rst
|
|
139
|
+ LAST_BLOG_ENTRY=$BLOG_CONTENT_PATH/${PREVIOUS_INDEX}_post.md
|
142
|
140
|
if [ ! -f $LAST_BLOG_ENTRY ]; then
|
143
|
141
|
return
|
144
|
142
|
fi
|