···
5
-
GEMLOG_DIR="${HOME}/nextcloud/sites/gemini/hyperreal.coffee/gemlog"
5
+
BLOG_DIR="${HOME}/repos/tildegit.org/hyperreal/hyperreal.coffee/http"
FILENAME_DATE=$(date '+%Y-%m-%d')
7
-
FILENAME="${FILENAME_DATE}-{{ slug }}.gmi"
8
-
cat <<EOF >"${GEMLOG_DIR}/${FILENAME}"
7
+
POST_DATE=$(date '+%Y-%m-%d %H:%M:%S')
8
+
FILENAME="${FILENAME_DATE}-{{ slug }}.md"
9
+
cat <<EOF >"${BLOG_DIR}/content/posts/${FILENAME}"
12
-
Last updated: $FILENAME_DATE
14
-
=> ../gemlog Gemlog archive
15
-
=> ../ hyperreal.coffee
17
-
nvim "${GEMLOG_DIR}/${FILENAME}"
17
+
nvim "${BLOG_DIR}/content/posts/${FILENAME}"
18
+
echo 'To add this entry to gemlog, run `blog2gmi ${BLOG_DIR}/content/posts/${FILENAME} "Blog Post Title"`'
19
-
# Edit gemlog atom feed
20
+
# Convert blog entry to gemlog
22
+
blog2gmi filename title:
23
-
nvim "${HOME}/nextcloud/sites/gemini/hyperreal.coffee/gemlog/atom.xml"
24
+
SCRIPT_DIR="${HOME}/repos/tildegit.org/hyperreal/hyperreal.coffee/scripts"
25
+
BLOG_POST_FILE={{ filename }}
26
+
BLOG_POST_TITLE={{ title }}
27
+
"${SCRIPT_DIR}/blog2gemini ${BLOG_POST_FILE} ${BLOG_POST_TITLE}"
28
+
echo "To push and deploy changes, run `push-deploy`"
30
+
# Convert website page changes to gemtext and send to capsule
29
-
nvim "${HOME}/nextcloud/sites/gemini/hyperreal.coffee/gemlog/index.gmi"
34
+
WEBSITE_DIR="${HOME}/repos/tildegit.org/hyperreal/hyperreal.coffee/http"
35
+
CAPSULE_DIR="${HOME}/repos/tildegit.org/hyperreal/hyperreal.coffee/gemini"
37
+
find "${WEBSITE_DIR}/content" \
40
+
-not -name "_index.md" \
41
+
-exec md2gemini -w -d "$CAPSULE_DIR" -f -m {} \;
43
+
echo "To push and deploy changes, run `push-deploy`"
31
-
# Publish changes to capsule
45
+
# Push hyperreal.coffee changes to git and deploy website and capsule
35
-
ssh jas@hyperreal.carp-wyvern.ts.net \
37
-
rm -rf /home/jas/public/gemini/hyperreal.coffee
51
+
HC_DIR="${HOME}/repos/tildegit.org/hyperreal/hyperreal.coffee"
53
+
msg_info="$(( $(git rev-list --count HEAD) + 1)) $(date '+%Y-%m-%d %H:%M:%S')"
55
+
git commit -m "Update: ${msg_info}"
56
+
git push -u origin main
58
+
WEBSITE_DIR="${HC_DIR}/http"
59
+
CAPSULE_DIR="${HC_DIR}/gemini"
60
+
PUBLIC_DIR="${HOME}/public_html"
62
+
rm -rf "${PUBLIC_DIR}/"*
63
+
hugo --gc --minify -d "${PUBLIC_DIR}" -s "$WEBSITE_DIR"
68
+
jas@hyperreal.carp-wyvern.ts.net:/home/jas/public/html
40
-
"${HOME}/nextcloud/sites/gemini/hyperreal.coffee" \
jas@hyperreal.carp-wyvern.ts.net:/home/jas/public/gemini
42
-
ssh jas@hyperreal.carp-wyvern.ts.net \
44
-
tree /home/jas/public/gemini
46
-
echo "Gemini capsule published successfully."
52
-
BLOG_DIR="${HOME}/repos/tildegit.org/hyperreal/hyperreal.coffee"
53
-
FILENAME_DATE=$(date '+%Y-%m-%d')
54
-
POST_DATE=$(date '+%Y-%m-%d %H:%M:%S')
55
-
FILENAME="${FILENAME_DATE}-{{ slug }}.md"
56
-
cat <<EOF >"${BLOG_DIR}/content/posts/${FILENAME}"
64
-
nvim "${BLOG_DIR}/content/posts/${FILENAME}"
77
+
echo "Website and capsule successfully deployed"