aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--README.md12
-rw-r--r--build-site.el70
-rw-r--r--makefile35
-rw-r--r--src/assets/stylesheet.css36
-rw-r--r--src/blog/first-post.org12
-rw-r--r--src/contact.md11
-rw-r--r--src/contact.org16
-rw-r--r--src/index.md6
-rw-r--r--src/index.org35
-rw-r--r--src/links.org4
-rw-r--r--src/services.org4
-rw-r--r--static/buttons/emacs.png (renamed from src/assets/buttons/emacs.png)bin1570 -> 1570 bytes
-rw-r--r--static/buttons/gentoo-badge.png (renamed from src/assets/buttons/gentoo-badge.png)bin3723 -> 3723 bytes
-rw-r--r--static/buttons/girlrot.gif (renamed from src/assets/buttons/girlrot.gif)bin5216 -> 5216 bytes
-rw-r--r--static/buttons/kitten.gif (renamed from src/assets/buttons/kitten.gif)bin437 -> 437 bytes
-rw-r--r--static/buttons/murrumurgreen.png (renamed from src/assets/buttons/murrumurgreen.png)bin1471 -> 1471 bytes
-rw-r--r--static/buttons/n1l.gif (renamed from src/assets/buttons/n1l.gif)bin3967 -> 3967 bytes
-rw-r--r--static/buttons/quasivoid.gif (renamed from src/assets/buttons/quasivoid.gif)bin426 -> 426 bytes
-rw-r--r--static/buttons/secondshell.webp (renamed from src/assets/buttons/secondshell.webp)bin350642 -> 350642 bytes
-rw-r--r--static/buttons/unlife.png (renamed from src/assets/buttons/unlife.png)bin2215 -> 2215 bytes
-rw-r--r--static/buttons/xnfm.png (renamed from src/assets/buttons/xnfm.png)bin2893 -> 2893 bytes
-rw-r--r--static/monero-qr.png (renamed from src/assets/monero-qr.png)bin7547 -> 7547 bytes
-rw-r--r--static/stylesheet.css36
-rw-r--r--template.html22
-rwxr-xr-xtemplate.pl32
-rw-r--r--templates/blog-sitemap.org5
-rw-r--r--templates/head.html1
28 files changed, 138 insertions, 206 deletions
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/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: <https://social.xenofem.me/users/azureazure>
+- 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: <hr>
-
-#+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: <hr>
-
-#+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/src/assets/buttons/emacs.png b/static/buttons/emacs.png
index 7277b5e..7277b5e 100644
--- a/src/assets/buttons/emacs.png
+++ b/static/buttons/emacs.png
Binary files differ
diff --git a/src/assets/buttons/gentoo-badge.png b/static/buttons/gentoo-badge.png
index 971ffe2..971ffe2 100644
--- a/src/assets/buttons/gentoo-badge.png
+++ b/static/buttons/gentoo-badge.png
Binary files differ
diff --git a/src/assets/buttons/girlrot.gif b/static/buttons/girlrot.gif
index 8e18810..8e18810 100644
--- a/src/assets/buttons/girlrot.gif
+++ b/static/buttons/girlrot.gif
Binary files differ
diff --git a/src/assets/buttons/kitten.gif b/static/buttons/kitten.gif
index fb8eca5..fb8eca5 100644
--- a/src/assets/buttons/kitten.gif
+++ b/static/buttons/kitten.gif
Binary files differ
diff --git a/src/assets/buttons/murrumurgreen.png b/static/buttons/murrumurgreen.png
index b3d42aa..b3d42aa 100644
--- a/src/assets/buttons/murrumurgreen.png
+++ b/static/buttons/murrumurgreen.png
Binary files differ
diff --git a/src/assets/buttons/n1l.gif b/static/buttons/n1l.gif
index 1ac0666..1ac0666 100644
--- a/src/assets/buttons/n1l.gif
+++ b/static/buttons/n1l.gif
Binary files differ
diff --git a/src/assets/buttons/quasivoid.gif b/static/buttons/quasivoid.gif
index bad248f..bad248f 100644
--- a/src/assets/buttons/quasivoid.gif
+++ b/static/buttons/quasivoid.gif
Binary files differ
diff --git a/src/assets/buttons/secondshell.webp b/static/buttons/secondshell.webp
index 4a00cec..4a00cec 100644
--- a/src/assets/buttons/secondshell.webp
+++ b/static/buttons/secondshell.webp
Binary files differ
diff --git a/src/assets/buttons/unlife.png b/static/buttons/unlife.png
index 71524d7..71524d7 100644
--- a/src/assets/buttons/unlife.png
+++ b/static/buttons/unlife.png
Binary files differ
diff --git a/src/assets/buttons/xnfm.png b/static/buttons/xnfm.png
index b7c36e8..b7c36e8 100644
--- a/src/assets/buttons/xnfm.png
+++ b/static/buttons/xnfm.png
Binary files differ
diff --git a/src/assets/monero-qr.png b/static/monero-qr.png
index 6722c4d..6722c4d 100644
--- a/src/assets/monero-qr.png
+++ b/static/monero-qr.png
Binary files 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 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title></title>
+ <link rel="stylesheet" href="/stylesheet.css">
+ </head>
+ <body>
+ <h2>
+ <nav>
+ <a href="/">HOME</a>
+ /
+ <a href="..">UP</a>
+ </nav>
+ </h2>
+
+ <article></article>
+
+ <hr>
+ <address><a href="contact.html">contact</a></address>
+</html>
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 @ <article>
+$dom->at('article')->append_content($content);
+
+# replace <title> 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">