···
+
BLOG_DIR="${HOME}/repos/tildegit.org/hyperreal/hyperreal.coffee/http"
FILENAME_DATE=$(date '+%Y-%m-%d')
+
POST_DATE=$(date '+%Y-%m-%d %H:%M:%S')
+
FILENAME="${FILENAME_DATE}-{{ slug }}.md"
+
cat <<EOF >"${BLOG_DIR}/content/posts/${FILENAME}"
+
nvim "${BLOG_DIR}/content/posts/${FILENAME}"
+
echo 'To add this entry to gemlog, run `blog2gmi ${BLOG_DIR}/content/posts/${FILENAME} "Blog Post Title"`'
+
# Convert blog entry to gemlog
+
blog2gmi filename title:
+
SCRIPT_DIR="${HOME}/repos/tildegit.org/hyperreal/hyperreal.coffee/scripts"
+
BLOG_POST_FILE={{ filename }}
+
BLOG_POST_TITLE={{ title }}
+
"${SCRIPT_DIR}/blog2gemini ${BLOG_POST_FILE} ${BLOG_POST_TITLE}"
+
echo "To push and deploy changes, run `push-deploy`"
+
# Convert website page changes to gemtext and send to capsule
+
WEBSITE_DIR="${HOME}/repos/tildegit.org/hyperreal/hyperreal.coffee/http"
+
CAPSULE_DIR="${HOME}/repos/tildegit.org/hyperreal/hyperreal.coffee/gemini"
+
find "${WEBSITE_DIR}/content" \
+
-not -name "_index.md" \
+
-exec md2gemini -w -d "$CAPSULE_DIR" -f -m {} \;
+
echo "To push and deploy changes, run `push-deploy`"
+
# Push hyperreal.coffee changes to git and deploy website and capsule
+
HC_DIR="${HOME}/repos/tildegit.org/hyperreal/hyperreal.coffee"
+
msg_info="$(( $(git rev-list --count HEAD) + 1)) $(date '+%Y-%m-%d %H:%M:%S')"
+
git commit -m "Update: ${msg_info}"
+
git push -u origin main
+
WEBSITE_DIR="${HC_DIR}/http"
+
CAPSULE_DIR="${HC_DIR}/gemini"
+
PUBLIC_DIR="${HOME}/public_html"
+
rm -rf "${PUBLIC_DIR}/"*
+
hugo --gc --minify -d "${PUBLIC_DIR}" -s "$WEBSITE_DIR"
+
jas@hyperreal.carp-wyvern.ts.net:/home/jas/public/html
jas@hyperreal.carp-wyvern.ts.net:/home/jas/public/gemini
+
echo "Website and capsule successfully deployed"