aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlemurianmage <azureazure@disroot.org>2026-05-31 00:17:31 +0200
committerlemurianmage <azureazure@disroot.org>2026-05-31 00:17:31 +0200
commitcf102ad6c7d171dd500cae8b419b7f5c1e796ab4 (patch)
treefc9c143c3f31b91aebf31d91e6a0e0960da15fc6
parent226c628caaa2fc393010c2fa948ec0c5d7664115 (diff)
downloadslimegirl.nexus-cf102ad6c7d171dd500cae8b419b7f5c1e796ab4.tar.gz
make instead of shell scripts
-rw-r--r--README.md11
-rwxr-xr-xbuild.sh5
-rw-r--r--makefile28
-rwxr-xr-xpost.sh7
4 files changed, 37 insertions, 14 deletions
diff --git a/README.md b/README.md
index 3e32135..13f2faf 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,15 @@
# slimegirl.nexus
-My very poorly put together org mode website and blog found @ https://slimegirl.nexus
+my very poorly put together org mode website and blog found @ https://slimegirl.nexus
-Use the code and writings however you want idc
+## dependencies
+
+entr, python, a modern emacs version, make, an internet conection to
+download the rss generation emacs package for the first build
+
+## loicense
+
+use the code and writings however you want idc
```
_,_
/7/Y/^\
diff --git a/build.sh b/build.sh
deleted file mode 100755
index 1b8bcfd..0000000
--- a/build.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-# the build breaks without this file for whatever reason
-[ -f src/blog/index.org ] || touch src/blog/index.org
-emacs -Q --script build-site.el
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..d356503
--- /dev/null
+++ b/makefile
@@ -0,0 +1,28 @@
+# this fucking sucks lol
+
+all: build
+
+serve:
+ xdg-open http://localhost:8000/
+ python3 -m http.server -d public/
+
+watch:
+ find src/ templates/ -type f | entr make build
+
+build: # shit breaks when index.org doesnt exist idk why
+ [ -f src/blog/index.org ] || touch src/blog/index.org
+ @mkdir -p public/
+ emacs -Q --script build-site.el
+
+compress: build # for gzip-static, check the obsd httpd.conf(5) man page
+ find public/ -type f \( -name "*.html" -o -name "*.css" -o -name "*.xml" \) \
+ -exec gzip -k {} \;
+
+publish: compress build
+ rsync -rcvP --delete public/ \
+ lemurianmage@slimegirl.nexus:/var/www/htdocs/slimegirl.nexus
+
+clean:
+ rm -r public/
+
+.PHONY: serve watch build compress publish clean
diff --git a/post.sh b/post.sh
deleted file mode 100755
index 90293e2..0000000
--- a/post.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env bash
-
-./build.sh
-# it's served with gzip-static later, check the httpd.conf(5) man page
-gzip -9 -f -k public{/,/**/}*.{html,css,xml}
-rsync -rtvzP public/ --rsync-path='doas rsync' \
- lemurianmage@slimegirl.nexus:/var/www/htdocs/slimegirl.nexus