This commit was merged in pull request #2.
This commit is contained in:
@@ -6,12 +6,13 @@
|
||||
# aw-post "Title" < body.md
|
||||
# echo "Post body here" | aw-post "Title"
|
||||
#
|
||||
# Creates a new markdown file in blog/posts/ with frontmatter.
|
||||
# Rebuilds the blog index and RSS feed.
|
||||
# Creates a new markdown file in blog/posts/ with frontmatter,
|
||||
# then rebuilds the blog index, post pages, and RSS feed.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
BLOG_DIR="$(cd "$(dirname "$0")/.." && pwd)/blog/posts"
|
||||
REPO_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
BLOG_DIR="${REPO_DIR}/blog/posts"
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Usage: aw-post \"Title of the Post\""
|
||||
@@ -46,4 +47,6 @@ ${BODY}
|
||||
EOF
|
||||
|
||||
echo "Created: ${FILEPATH}"
|
||||
echo "Next: rebuild with 'make build'"
|
||||
|
||||
# Rebuild the blog
|
||||
python3 "${REPO_DIR}/scripts/build.py"
|
||||
|
||||
Reference in New Issue
Block a user