From cf102ad6c7d171dd500cae8b419b7f5c1e796ab4 Mon Sep 17 00:00:00 2001 From: lemurianmage Date: Sun, 31 May 2026 00:17:31 +0200 Subject: make instead of shell scripts --- README.md | 11 +++++++++-- build.sh | 5 ----- makefile | 28 ++++++++++++++++++++++++++++ post.sh | 7 ------- 4 files changed, 37 insertions(+), 14 deletions(-) delete mode 100755 build.sh create mode 100644 makefile delete mode 100755 post.sh 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 -- cgit v1.2.3