summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/lib.m411
1 files changed, 11 insertions, 0 deletions
diff --git a/include/lib.m4 b/include/lib.m4
index 6220c84..24a911f 100644
--- a/include/lib.m4
+++ b/include/lib.m4
@@ -20,3 +20,14 @@ m4_define(
m4_dnl Macro for generating abbrevations
m4_define(m4_abbr, ⁨@abbr .m4_translit($1, A-Z2, a-zt) {-$1}⁩)
+
+m4_define(m4_file_create_date, ⁨m4_esyscmd(
+ git log --reverse --pretty='format:%cI' $(dirname m4___file__)/$1/index.gsp \
+ | head -n1 \
+ | xargs date +'%-d %B %Y' -d
+)⁩)
+
+m4_define(m4_article, ⁨li .article {
+ a href="$1" $2
+ span {-m4_file_create_date($1)}
+}⁩)