Commit bc7637bd authored by PoroCYon's avatar PoroCYon

RSS Test

parent c833ae01
......@@ -5,10 +5,22 @@ set -e
read -erp "Title: " TITLE
read -erp "Filename: " FILENAME
mkdir -p "src/blog/post/"
$EDITOR "src/blog/post/${FILENAME}.md"
DIR="src/blog/post/"
FILE="${DIR}${FILENAME}.md"
if [ -f "src/blog/post/${FILENAME}.md" ]; then
mkdir -p "$DIR"
ADDENTRY=0
if ! [ -f "$FILE" ]; then
echo -e "# ${TITLE}\n\n" > "$FILE"
ADDENTRY=1
fi
$EDITOR "$FILE"
git add "$FILE"
if [ "$ADDENTRY" = 1 ] && [ -f "$FILE" ]; then
echo -e "${FILENAME}\t$(date '+%F')\t${TITLE}\t$(uuidgen)" >> src/blog/postdb.tsv
fi
# RSS Test
RSS and Atom should be working now... hopefully.
hello-world 2017-12-13 Hello, world! 69c41ec1-6053-48c8-84a6-347eaffe5e1f
rss-test 2017-12-13 RSS Test aa3f14ca-1701-4803-8db9-85d907597724
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment