From c08732dd0b519adec3191c7051662dfb01334d74 Mon Sep 17 00:00:00 2001
From: Amin Bandali
Date: Mon, 20 Apr 2020 21:42:38 -0400
Subject: [PATCH] fix remaining issues with non-numeric slugs
---
Makefile | 9 ++++-----
arch-macbook-air.m4 | 9 +++++----
computing.m4 | 9 +++++----
contact.m4 | 6 ++++--
cv.m4 | 7 ++++---
feed_atom.m4 | 3 ++-
feed_rss.m4 | 3 ++-
footer.html | 7 ++++---
header.html | 10 +++++++---
index.m4 | 6 ++++--
license.m4 | 6 ++++--
meta_notes.m4 | 5 +++++
se212-f19.m4 | 6 ++++--
13 files changed, 54 insertions(+), 32 deletions(-)
create mode 100644 meta_notes.m4
diff --git a/Makefile b/Makefile
index a41b020..4fb327f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,12 @@
-LATEST=2
-SRC := $(filter-out $(wildcard feed_*),$(wildcard *.m4))
+SRC := $(filter-out $(wildcard feed_*) meta_notes.m4,$(wildcard *.m4))
OUTPUTS := $(patsubst %.m4,out/%.html,$(SRC))
STATIC := $(patsubst static/%,out/%,$(wildcard static/*))
all: $(OUTPUTS) out/notes.atom out/notes.rss out/style.css $(STATIC)
-out/%.html: %.m4 header.html footer.html ; m4 -D__latest=$(LATEST) $< > $@
-out/notes.atom: feed_atom.m4 ; m4 -D__latest=$(LATEST) $< > $@
-out/notes.rss: feed_rss.m4 ; m4 -D__latest=$(LATEST) $< > $@
+out/%.html: %.m4 header.html footer.html ; m4 $< > $@
+out/notes.atom: feed_atom.m4 ; m4 $< > $@
+out/notes.rss: feed_rss.m4 ; m4 $< > $@
$(STATIC): ; ln -s $(PWD)/static/$(notdir $@) $@
deploy:
diff --git a/arch-macbook-air.m4 b/arch-macbook-air.m4
index 4d2a348..4435a94 100644
--- a/arch-macbook-air.m4
+++ b/arch-macbook-air.m4
@@ -1,10 +1,10 @@
dnl -*- html -*-
+define(__title, `Arch GNU/Linux on MacBook Air 2013')dnl
define(__pub, 2016-11-01T12:00:00Z)dnl
define(__upd, 2020-03-27T12:00:00Z)dnl
-define(__title, `Arch GNU/Linux on MacBook Air 2013')dnl
-define(__slug, `computing')dnl
define(__id, 1)dnl
-include(header.html)
+include(header.html)dnl
+
This post summarizes how I install and dual-boot Arch GNU/Linux
with Full-Disk Encryption alongside macOS. It is not meant to be a
replacement for the
@@ -272,5 +272,6 @@ bits and pieces, about installing Arch on a MacBook:
Arch Linux running on my MacBook
Dual boot Arch Linux on MacBook Pro Installation
+
define(__copy, `2016, 2019, 2020')dnl
-include(footer.html)
+include(footer.html)dnl
diff --git a/computing.m4 b/computing.m4
index e15e2aa..d9f1c6e 100644
--- a/computing.m4
+++ b/computing.m4
@@ -1,10 +1,10 @@
dnl -*- html -*-
+define(__title, `How I do my Computing')dnl
define(__pub, 2019-09-14T12:00:00Z)dnl
define(__upd, 2019-11-30T23:00:00Z)dnl
-define(__title, `How I do my Computing')dnl
-define(__slug, `computing')dnl
define(__id, 2)dnl
-include(header.html)
+include(header.html)dnl
+
(Inspired by computing pages of
rms and
Leah Rowe )
@@ -47,5 +47,6 @@ for functioning. I can't wait for lxo's
0G to become a
reality fast enough.
:-)
+
define(__copy, `2019')dnl
-include(footer.html)
+include(footer.html)dnl
diff --git a/contact.m4 b/contact.m4
index a56f36f..8e5f192 100644
--- a/contact.m4
+++ b/contact.m4
@@ -1,7 +1,8 @@
dnl -*- html -*-
define(__title, `Contact Information')dnl
define(__slug, `contact')dnl
-include(header.html)
+include(header.html)dnl
+
Contact information
Email is by far my preferred method of communication. I may be
@@ -62,4 +63,5 @@ necessary.
notbandali on Twitter
-include(footer.html)
+
+include(footer.html)dnl
diff --git a/cv.m4 b/cv.m4
index c92cca3..8a7bf94 100644
--- a/cv.m4
+++ b/cv.m4
@@ -1,8 +1,8 @@
dnl -*- html -*-
define(__title, `Curriculum vitae')dnl
define(__slug, `cv')dnl
-include(header.html)
-
+include(header.html)dnl
+
Curriculum vitae (PDF )
@@ -62,4 +62,5 @@ Department, York University | Fall 2017
Teaching Assistant
EECS 1012 :
TA in Fall 2017
-include(footer.html)
+
+include(footer.html)dnl
diff --git a/feed_atom.m4 b/feed_atom.m4
index 8cbffc0..f0c9a46 100644
--- a/feed_atom.m4
+++ b/feed_atom.m4
@@ -1,3 +1,4 @@
+include(meta_notes.m4)dnl
Amin Bandali's Personal Site
@@ -9,5 +10,5 @@ define(__feed_atom)dnl
define(`fordown',`ifelse($#,0,``$0'',`ifelse(eval($2>=$3),1,
`pushdef(`$1',$2)$4`'popdef(`$1')$0(`$1',decr($2),$3,`$4')')')')
fordown(`__i',__latest,eval(__latest-10),`
- syscmd(sed "s/\&/\&/g;s/>/\>/g;s/\</g" __i.m4 | m4 -D__feed_atom)')
+ syscmd(sed "s/\&/\&/g;s/>/\>/g;s/\</g" _get(`notes', __i).m4 | m4 -D__feed_atom)')
diff --git a/feed_rss.m4 b/feed_rss.m4
index 6830453..8ebecd8 100644
--- a/feed_rss.m4
+++ b/feed_rss.m4
@@ -1,3 +1,4 @@
+include(meta_notes.m4)dnl
@@ -11,6 +12,6 @@ define(__feed_rss)dnl
define(`fordown',`ifelse($#,0,``$0'',`ifelse(eval($2>=$3),1,
`pushdef(`$1',$2)$4`'popdef(`$1')$0(`$1',decr($2),$3,`$4')')')')
fordown(`__i',__latest,eval(__latest-10),`
- syscmd(sed "s/\&/\&/g;s/>/\>/g;s/\</g" __i.m4 | m4 -D__feed_rss)')
+ syscmd(sed "s/\&/\&/g;s/>/\>/g;s/\</g" _get(`notes', __i).m4 | m4 -D__feed_rss)')
diff --git a/footer.html b/footer.html
index 34f9250..098115d 100644
--- a/footer.html
+++ b/footer.html
@@ -1,10 +1,11 @@
ifdef(`__feed_atom', `',
-`ifdef(`__feed_rss',`',
+`ifdef(`__feed_rss', `',
`ifdef(`__pub',
`Got a question or comment? You can find my
email address on my contact page.
:-)
-')
+
+')dnl
ifdef(`__copy',
`
@@ -13,4 +14,4 @@ See the ifelse(__slug,`license',`above for license conditions',`
Amin Bandali
@@ -26,8 +28,10 @@ ifdef(`__feed_atom',
ifdef(`__pub',
-`ifdef(`__first',,` ')'
-`ifdef(`__last',,` ')')
+define(__previd, `_get(`notes', decr(__id))')dnl
+define(__nextid, `_get(`notes', incr(__id))')dnl
+`ifelse(__previd,,,` ')'dnl
+`ifelse(__nextid,,,` ')')dnl
@@ -50,4 +54,4 @@ ifdef(`__pub',
__title
Published on syscmd(date "-d __pub" "+%B %e`,' %Y" | tr -d \\n)`'ifdef(`__upd',`
Last updated on syscmd(date "-d __upd" "+%B %e`,' %Y" | tr -d \\n)')
- ')')')
+')')')dnl
diff --git a/index.m4 b/index.m4
index 9fdad21..509d850 100644
--- a/index.m4
+++ b/index.m4
@@ -2,7 +2,8 @@ dnl -*- html -*-
define(__title, `Amin Bandali''`s Personal Site')dnl
define(__slug, `home')dnl
define(__nts)dnl
-include(header.html)
+include(header.html)dnl
+
+
define(__copy, `2016–2019')dnl
-include(footer.html)
+include(footer.html)dnl
diff --git a/license.m4 b/license.m4
index 1cf8818..35e5912 100644
--- a/license.m4
+++ b/license.m4
@@ -1,7 +1,8 @@
dnl -*- html -*-
define(__title, `Licensing Information')dnl
define(__slug, `license')dnl
-include(header.html)
+include(header.html)dnl
+
License information for bandali.eu.org
I strongly believe in
@@ -22,5 +23,6 @@ later version. A copy of the license is included at
Proprietary Software Is Often Malware
+
define(__copy, `2019')dnl
-include(footer.html)
+include(footer.html)dnl
diff --git a/meta_notes.m4 b/meta_notes.m4
new file mode 100644
index 0000000..f5a6e17
--- /dev/null
+++ b/meta_notes.m4
@@ -0,0 +1,5 @@
+define(`__latest', 2)dnl
+define(`_put', `define(`$1[$2]', `$3')')dnl
+define(`_get', `defn(`$1[$2]')')dnl
+_put(`notes', 1, `arch-macbook-air')dnl
+_put(`notes', 2, `computing')dnl
diff --git a/se212-f19.m4 b/se212-f19.m4
index 3b1aeb9..8553aa6 100644
--- a/se212-f19.m4
+++ b/se212-f19.m4
@@ -1,7 +1,8 @@
dnl -*- html -*-
define(__title, `SE 212 Material')dnl
define(__slug, `se212-f19')dnl
-include(header.html)
+include(header.html)dnl
+
Material from SE 212 tutorials
This page contains slides and other material from
@@ -40,4 +41,5 @@ solution
Tutorial 10: worked through questions 1â10 of Homework 10
-include(footer.html)
+
+include(footer.html)dnl
--
2.20.1