From 7da42c6e577f49ad4981f24c833b2e1d86357e0b Mon Sep 17 00:00:00 2001 From: lemurianmage Date: Fri, 12 Jun 2026 23:35:20 +0200 Subject: redesign and move to markdown with a perl+make build system --- .gitignore | 7 +--- README.md | 12 ++++-- build-site.el | 70 ----------------------------------- makefile | 35 +++++++++++------- src/assets/buttons/emacs.png | Bin 1570 -> 0 bytes src/assets/buttons/gentoo-badge.png | Bin 3723 -> 0 bytes src/assets/buttons/girlrot.gif | Bin 5216 -> 0 bytes src/assets/buttons/kitten.gif | Bin 437 -> 0 bytes src/assets/buttons/murrumurgreen.png | Bin 1471 -> 0 bytes src/assets/buttons/n1l.gif | Bin 3967 -> 0 bytes src/assets/buttons/quasivoid.gif | Bin 426 -> 0 bytes src/assets/buttons/secondshell.webp | Bin 350642 -> 0 bytes src/assets/buttons/unlife.png | Bin 2215 -> 0 bytes src/assets/buttons/xnfm.png | Bin 2893 -> 0 bytes src/assets/monero-qr.png | Bin 7547 -> 0 bytes src/assets/stylesheet.css | 36 ------------------ src/blog/first-post.org | 12 ------ src/contact.md | 11 ++++++ src/contact.org | 16 -------- src/index.md | 6 +++ src/index.org | 35 ------------------ src/links.org | 4 -- src/services.org | 4 -- static/buttons/emacs.png | Bin 0 -> 1570 bytes static/buttons/gentoo-badge.png | Bin 0 -> 3723 bytes static/buttons/girlrot.gif | Bin 0 -> 5216 bytes static/buttons/kitten.gif | Bin 0 -> 437 bytes static/buttons/murrumurgreen.png | Bin 0 -> 1471 bytes static/buttons/n1l.gif | Bin 0 -> 3967 bytes static/buttons/quasivoid.gif | Bin 0 -> 426 bytes static/buttons/secondshell.webp | Bin 0 -> 350642 bytes static/buttons/unlife.png | Bin 0 -> 2215 bytes static/buttons/xnfm.png | Bin 0 -> 2893 bytes static/monero-qr.png | Bin 0 -> 7547 bytes static/stylesheet.css | 36 ++++++++++++++++++ template.html | 22 +++++++++++ template.pl | 32 ++++++++++++++++ templates/blog-sitemap.org | 5 --- templates/head.html | 1 - 39 files changed, 138 insertions(+), 206 deletions(-) delete mode 100644 build-site.el delete mode 100644 src/assets/buttons/emacs.png delete mode 100644 src/assets/buttons/gentoo-badge.png delete mode 100644 src/assets/buttons/girlrot.gif delete mode 100644 src/assets/buttons/kitten.gif delete mode 100644 src/assets/buttons/murrumurgreen.png delete mode 100644 src/assets/buttons/n1l.gif delete mode 100644 src/assets/buttons/quasivoid.gif delete mode 100644 src/assets/buttons/secondshell.webp delete mode 100644 src/assets/buttons/unlife.png delete mode 100644 src/assets/buttons/xnfm.png delete mode 100644 src/assets/monero-qr.png delete mode 100644 src/assets/stylesheet.css delete mode 100644 src/blog/first-post.org create mode 100644 src/contact.md delete mode 100644 src/contact.org create mode 100644 src/index.md delete mode 100644 src/index.org delete mode 100644 src/links.org delete mode 100644 src/services.org create mode 100644 static/buttons/emacs.png create mode 100644 static/buttons/gentoo-badge.png create mode 100644 static/buttons/girlrot.gif create mode 100644 static/buttons/kitten.gif create mode 100644 static/buttons/murrumurgreen.png create mode 100644 static/buttons/n1l.gif create mode 100644 static/buttons/quasivoid.gif create mode 100644 static/buttons/secondshell.webp create mode 100644 static/buttons/unlife.png create mode 100644 static/buttons/xnfm.png create mode 100644 static/monero-qr.png create mode 100644 static/stylesheet.css create mode 100644 template.html create mode 100755 template.pl delete mode 100644 templates/blog-sitemap.org delete mode 100644 templates/head.html diff --git a/.gitignore b/.gitignore index ec18a71..6a3417b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1 @@ -# autogenerated sitemap -/src/blog/index.org -# generated rss feed -/src/blog/rss.xml -/public/ -/pkgs/ +/out/ diff --git a/README.md b/README.md index 13f2faf..bb3ea8f 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,19 @@ # slimegirl.nexus -my very poorly put together org mode website and blog found @ https://slimegirl.nexus +my website and blog found @ https://slimegirl.nexus.\ +everything is generated from markdown with md2html and a perl script +that does the templating and html post-processing work (template.pl). ## dependencies -entr, python, a modern emacs version, make, an internet conection to -download the rss generation emacs package for the first build +build: make, perl5, Mojo::DOM, md2html (md4c)\ +dev: python3, entr\ +publish: rsync\ +a typical linux/bsd system will have most of these already. ## loicense -use the code and writings however you want idc +intellectual property is a spook. ``` _,_ /7/Y/^\ diff --git a/build-site.el b/build-site.el deleted file mode 100644 index 6e53658..0000000 --- a/build-site.el +++ /dev/null @@ -1,70 +0,0 @@ -(setq package-user-dir "pkgs") -(package-initialize) -(require 'ox-publish) -(use-package org-publish-rss - :vc (:url "https://git.sr.ht/~taingram/org-publish-rss" - :rev :newest)) - -(defun file-to-string (file) - (with-temp-buffer - (insert-file-contents file) - (buffer-string))) - -(setq org-html-validation-link nil - org-html-head-include-scripts nil - org-html-doctype "html5" - org-html-html5-fancy t - org-html-head-include-default-style nil - org-html-head (file-to-string "templates/head.html") - org-html-postamble nil - org-export-with-section-numbers nil - org-export-with-timestamps nil - org-export-with-toc nil - org-export-with-smart-quotes t) - -(defun sitemap-format-entry (entry style project) - (let ((spec `((?t . ,(org-publish-find-title entry project)) - (?d . ,(format-time-string "%F" (org-publish-find-date entry project))) - (?h . ,entry)))) - (format-spec "%d - [[file:%h][%t]]" spec))) - -(defun sitemap-function (title list) ; todo change this - (let ((spec `((?t . ,title) - (?l . ,(org-list-to-org list))))) - (format-spec (file-to-string "templates/blog-sitemap.org") spec))) - -(setq org-publish-project-alist - (list - (list "blog" - :base-directory "src/blog" - :publishing-directory "public/blog" - :publishing-function 'org-html-publish-to-html - :auto-sitemap t - :sitemap-title "slimegirl.nexus" - :sitemap-filename "index.org" - :sitemap-sort-files 'anti-chronologically - :sitemap-format-entry 'sitemap-format-entry - :sitemap-function 'sitemap-function - :auto-rss t - :rss-description "goop" - :rss-link "https://slimegirl.nexus/blog" - :rss-copyright "nah" - :completion-function 'org-publish-rss) - (list "pages" - :base-directory "src" - :publishing-function 'org-html-publish-to-html - :publishing-directory "public") - (list "assets" - :recursive t - :base-directory "src/assets" - :base-extension 'any - :include '("../blog/rss.xml") - :publishing-function 'org-publish-attachment - :publishing-directory "public/assets"))) - -(delete-directory "public" :recursive t) -(setenv "TZ" "UTC0") ; remove the timezone from rss output -(org-publish-all t) -(delete-file "src/blog/rss.xml~") ; I have no clue why this thing appears at all - -(message "Build done!") diff --git a/makefile b/makefile index d356503..8c7f1de 100644 --- a/makefile +++ b/makefile @@ -1,28 +1,37 @@ -# this fucking sucks lol - all: build +build: $(patsubst src/%.md, out/%.html, $(shell find src -type f)) \ + $(patsubst static/%, out/%, $(shell find static -type f)) \ + $(patsubst src/%, out/%, $(shell find src -type f ! -name "*.md")) + serve: xdg-open http://localhost:8000/ - python3 -m http.server -d public/ + python3 -m http.server -d out/ watch: - find src/ templates/ -type f | entr make build + find . -type f ! -path "./out/*" | entr make build + +out/%.html: src/%.md template.html template.pl + @mkdir -p $(dir $@) + ./template.pl $< > $@ + +out/%: src/% + @mkdir -p $(dir $@) + cp $< $@ -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 +out/%: static/% + @mkdir -p $(dir $@) + cp $< $@ -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" \) \ +compress: build # for gzip-static, check the openbsd httpd.conf(5) man page + find out/ -type f \( -name "*.html" -o -name "*.css" \) \ -exec gzip -k {} \; publish: compress build - rsync -rcvP --delete public/ \ + rsync -rcvP --delete out/ \ lemurianmage@slimegirl.nexus:/var/www/htdocs/slimegirl.nexus clean: - rm -r public/ + rm -r out/ -.PHONY: serve watch build compress publish clean +.PHONY: build serve watch compress publish clean diff --git a/src/assets/buttons/emacs.png b/src/assets/buttons/emacs.png deleted file mode 100644 index 7277b5e..0000000 Binary files a/src/assets/buttons/emacs.png and /dev/null differ diff --git a/src/assets/buttons/gentoo-badge.png b/src/assets/buttons/gentoo-badge.png deleted file mode 100644 index 971ffe2..0000000 Binary files a/src/assets/buttons/gentoo-badge.png and /dev/null differ diff --git a/src/assets/buttons/girlrot.gif b/src/assets/buttons/girlrot.gif deleted file mode 100644 index 8e18810..0000000 Binary files a/src/assets/buttons/girlrot.gif and /dev/null differ diff --git a/src/assets/buttons/kitten.gif b/src/assets/buttons/kitten.gif deleted file mode 100644 index fb8eca5..0000000 Binary files a/src/assets/buttons/kitten.gif and /dev/null differ diff --git a/src/assets/buttons/murrumurgreen.png b/src/assets/buttons/murrumurgreen.png deleted file mode 100644 index b3d42aa..0000000 Binary files a/src/assets/buttons/murrumurgreen.png and /dev/null differ diff --git a/src/assets/buttons/n1l.gif b/src/assets/buttons/n1l.gif deleted file mode 100644 index 1ac0666..0000000 Binary files a/src/assets/buttons/n1l.gif and /dev/null differ diff --git a/src/assets/buttons/quasivoid.gif b/src/assets/buttons/quasivoid.gif deleted file mode 100644 index bad248f..0000000 Binary files a/src/assets/buttons/quasivoid.gif and /dev/null differ diff --git a/src/assets/buttons/secondshell.webp b/src/assets/buttons/secondshell.webp deleted file mode 100644 index 4a00cec..0000000 Binary files a/src/assets/buttons/secondshell.webp and /dev/null differ diff --git a/src/assets/buttons/unlife.png b/src/assets/buttons/unlife.png deleted file mode 100644 index 71524d7..0000000 Binary files a/src/assets/buttons/unlife.png and /dev/null differ diff --git a/src/assets/buttons/xnfm.png b/src/assets/buttons/xnfm.png deleted file mode 100644 index b7c36e8..0000000 Binary files a/src/assets/buttons/xnfm.png and /dev/null differ diff --git a/src/assets/monero-qr.png b/src/assets/monero-qr.png deleted file mode 100644 index 6722c4d..0000000 Binary files a/src/assets/monero-qr.png and /dev/null differ diff --git a/src/assets/stylesheet.css b/src/assets/stylesheet.css deleted file mode 100644 index 3b032d1..0000000 --- a/src/assets/stylesheet.css +++ /dev/null @@ -1,36 +0,0 @@ -:root -{ - --main: #ebabb9; - --bg: #1e1f21; - --fg: #eeeff1; -} - -.footpara { display: inline; } - -body -{ - background-color: var(--bg); - color: var(--fg); - max-width: 80ch; - margin: auto; - font-family: serif; - font-variant-emoji: text; -} - -a { color: var(--main); } - -.buttons > p { margin: 0; } - -.footnum, .footref { text-decoration: none; } - -.pages { text-align: center; } - -.logo -{ - color: var(--main); - font-size: 2em; - margin-bottom: 0; -} - -ul { list-style: "~> " }; - diff --git a/src/blog/first-post.org b/src/blog/first-post.org deleted file mode 100644 index 29c2f8f..0000000 --- a/src/blog/first-post.org +++ /dev/null @@ -1,12 +0,0 @@ -#+TITLE: first post -#+SUBTITLE: with an epic fuarrking subtitle -#+DATE: <2025-12-13> - -* hi -this is a test post that mostly exists to check if the org mode publishing system works. - -this[fn:1] is a footnote. - -* Footnotes - -[fn:1] bweh diff --git a/src/contact.md b/src/contact.md new file mode 100644 index 0000000..0369b87 --- /dev/null +++ b/src/contact.md @@ -0,0 +1,11 @@ +# contact + +- fedi: +- signal: ask +- irc: azure @ irc.xenofem.me +- mail: azureazure () disroot ! org + +## donations + +monero: `83FxBRziyTQWuPKqGTesWGjLfM5Vai8QSbikur5zGHWKFc584cgmbKHjWpQoJzR9Su7NVEX9GVg23iksCKp8doBFCVSsGca` +![Monero public address QR code](monero-qr.png) \ No newline at end of file diff --git a/src/contact.org b/src/contact.org deleted file mode 100644 index 264bf7d..0000000 --- a/src/contact.org +++ /dev/null @@ -1,16 +0,0 @@ -#+TITLE: contact - -I don't use popular social media at all and the only one you can find me on is fedi. -- fedi: [[https://social.xenofem.me/users/azureazure]] -- signal: ask for it -- irc: azure @ irc.xenofem.me (I'm always online) -- mail: azureazure[at]disroot{dot}org (I don't check it really often) - -* donations -If you like what I'm doing or you simply want to throw money at me here are all the ways in which you can do that. - -- Monero: -#+ATTR_HTML: :style overflow-wrap: break-word; -=83FxBRziyTQWuPKqGTesWGjLfM5Vai8QSbikur5zGHWKFc584cgmbKHjWpQoJzR9Su7NVEX9GVg23iksCKp8doBFCVSsGca= -#+ATTR_HTML: :title Monero wallet qr code -[[file:assets/monero-qr.png]] diff --git a/src/index.md b/src/index.md new file mode 100644 index 0000000..ac17203 --- /dev/null +++ b/src/index.md @@ -0,0 +1,6 @@ +# slimegirl.nexus + +## about +This is the personal website of philomena (she/her) also known as lemurianmage +and azureazure in other places. My interests include mathematics, philosophy, +C, Unix, Lisp and electrical engineering. My paws are big and my tail is fluffy. \ No newline at end of file diff --git a/src/index.org b/src/index.org deleted file mode 100644 index e5c2436..0000000 --- a/src/index.org +++ /dev/null @@ -1,35 +0,0 @@ -#+OPTIONS: title:nil -#+TITLE: bloop -#+ATTR_HTML: :class logo -*/SLIMEGIRL.NEXUS/* - -/decomposes you cutely :p/ -#+HTML:
- -#+BEGIN_pages -[[file:blog/index.org][/blog]] ~ [[file:contact.org][/contact]] ~ [[file:links.org][/links]] ~ [[file:services.org][/services]] -#+END_pages -* about -This is the personal website of Philomena (she/her) also known as lemurianmage -and azureazure in other places. My interests include mathematics, -electromagnetics, philosophy, C, Unix, Lisp and electrical engineering -(especially RF electronics). My paws are big and my tail is fluffy. - -* recent posts -#+INCLUDE: "blog/index.org::*Posts" :only-contents t :lines "1-6" - -#+HTML:
- -#+BEGIN_buttons -[[https://xenofem.me][file:assets/buttons/xnfm.png]] -[[https://magentahardcore.com][file:assets/buttons/n1l.gif]] -[[https://unlife.nyx.land][file:assets/buttons/unlife.png]] -[[https://kittenlikeasmallcat.neocities.org][file:assets/buttons/kitten.gif]] -[[https://girlr0t.neocities.org][file:assets/buttons/girlrot.gif]] -[[https://twinningl00m.neocities.org/][file:assets/buttons/murrumurgreen.png]] -[[https://secondshell.net][file:assets/buttons/secondshell.webp]] -[[https://quasivoid.net][file:assets/buttons/quasivoid.gif]] - -[[https://gentoo.org][file:assets/buttons/gentoo-badge.png]] -[[https://www.gnu.org/software/emacs][file:assets/buttons/emacs.png]] -#+END_buttons diff --git a/src/links.org b/src/links.org deleted file mode 100644 index a2c61cd..0000000 --- a/src/links.org +++ /dev/null @@ -1,4 +0,0 @@ -#+TITLE: links - -various cool things and people: -TODO FILL THIS SHITE OUT diff --git a/src/services.org b/src/services.org deleted file mode 100644 index 5b153af..0000000 --- a/src/services.org +++ /dev/null @@ -1,4 +0,0 @@ -#+TITLE: services - -Not much so far but there /will/ be more \=w\=. -- [[https://git.slimegirl.nexus][cgit]] (my personal projects) diff --git a/static/buttons/emacs.png b/static/buttons/emacs.png new file mode 100644 index 0000000..7277b5e Binary files /dev/null and b/static/buttons/emacs.png differ diff --git a/static/buttons/gentoo-badge.png b/static/buttons/gentoo-badge.png new file mode 100644 index 0000000..971ffe2 Binary files /dev/null and b/static/buttons/gentoo-badge.png differ diff --git a/static/buttons/girlrot.gif b/static/buttons/girlrot.gif new file mode 100644 index 0000000..8e18810 Binary files /dev/null and b/static/buttons/girlrot.gif differ diff --git a/static/buttons/kitten.gif b/static/buttons/kitten.gif new file mode 100644 index 0000000..fb8eca5 Binary files /dev/null and b/static/buttons/kitten.gif differ diff --git a/static/buttons/murrumurgreen.png b/static/buttons/murrumurgreen.png new file mode 100644 index 0000000..b3d42aa Binary files /dev/null and b/static/buttons/murrumurgreen.png differ diff --git a/static/buttons/n1l.gif b/static/buttons/n1l.gif new file mode 100644 index 0000000..1ac0666 Binary files /dev/null and b/static/buttons/n1l.gif differ diff --git a/static/buttons/quasivoid.gif b/static/buttons/quasivoid.gif new file mode 100644 index 0000000..bad248f Binary files /dev/null and b/static/buttons/quasivoid.gif differ diff --git a/static/buttons/secondshell.webp b/static/buttons/secondshell.webp new file mode 100644 index 0000000..4a00cec Binary files /dev/null and b/static/buttons/secondshell.webp differ diff --git a/static/buttons/unlife.png b/static/buttons/unlife.png new file mode 100644 index 0000000..71524d7 Binary files /dev/null and b/static/buttons/unlife.png differ diff --git a/static/buttons/xnfm.png b/static/buttons/xnfm.png new file mode 100644 index 0000000..b7c36e8 Binary files /dev/null and b/static/buttons/xnfm.png differ diff --git a/static/monero-qr.png b/static/monero-qr.png new file mode 100644 index 0000000..6722c4d Binary files /dev/null and b/static/monero-qr.png differ diff --git a/static/stylesheet.css b/static/stylesheet.css new file mode 100644 index 0000000..df916fb --- /dev/null +++ b/static/stylesheet.css @@ -0,0 +1,36 @@ +body +{ + background-color: white; + color: black; + max-width: 80ch; + margin: auto; + font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', sans-serif; + font-size: 1.2em; +} + +nav { text-align: center; } + +hr +{ + border: 0; + border-bottom: 1px dashed; +} + +img +{ + display: block; + margin: auto; + margin-top: 1em; + margin-bottom: 1em; +} + +@media (prefers-color-scheme: dark) +{ + body + { + background-color: #1e1f21; + color: #eeeff1; + } + :link { color: #bad7ff; } + :visited { color: #f6baff; } +} diff --git a/template.html b/template.html new file mode 100644 index 0000000..f85cd94 --- /dev/null +++ b/template.html @@ -0,0 +1,22 @@ + + + + + + + + + +

+ +

+ +
+ +
+
contact
+ diff --git a/template.pl b/template.pl new file mode 100755 index 0000000..747ac7c --- /dev/null +++ b/template.pl @@ -0,0 +1,32 @@ +#!/usr/bin/env perl + +# this script is generally responsible for all html postprocessing that md2html can't do + +use v5.39; +use utf8; +use autodie; + +use Mojo::DOM; + +my $template = do { + local $/ = undef; + open my $fh, '<', 'template.html'; + <$fh>; +}; + +my $dom = Mojo::DOM->new($template); + +my $content = `md2html $ARGV[0]`; +# inject content @
+$dom->at('article')->append_content($content); + +# replace with the contents of the first <h1> +my $title_dom = $dom->at('h1'); +$dom->at('title')->content($title_dom->text) if ($title_dom); + +for my $img ($dom->find('img')->each) { + my $alt = $img->attr('alt'); + $img->attr(title => $alt); +} + +say "$dom"; diff --git a/templates/blog-sitemap.org b/templates/blog-sitemap.org deleted file mode 100644 index 6c87cab..0000000 --- a/templates/blog-sitemap.org +++ /dev/null @@ -1,5 +0,0 @@ -#+TITLE: %t -([[file:rss.xml][rss]]) - -* Posts -%l diff --git a/templates/head.html b/templates/head.html deleted file mode 100644 index 405f026..0000000 --- a/templates/head.html +++ /dev/null @@ -1 +0,0 @@ -<link rel="stylesheet" href="/assets/stylesheet.css"> -- cgit v1.2.3