]> git.plutz.net Git - shellwiki/commitdiff
introduce reflink macro
authorPaul Hänsch <paul@plutz.net>
Wed, 11 May 2022 15:23:10 +0000 (17:23 +0200)
committerPaul Hänsch <paul@plutz.net>
Wed, 11 May 2022 15:23:10 +0000 (17:23 +0200)
macros/reflink [new file with mode: 0755]
pages/[wiki]/403/#page.md
pages/[wiki]/404/#page.md

diff --git a/macros/reflink b/macros/reflink
new file mode 100755 (executable)
index 0000000..1b38c15
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+. "$_EXEC/cgilite/cgilite.sh"
+
+title="$(HTML "$1")"
+ref="$(HEADER Referer)"
+
+printf '<a class=reflink href="%s">%s</a>' "${ref:-./}" "${title:-Return}"
index 66ea5e232c82b5f3717c5d6ebc32a32ed52b71d3..d15309bdb2c8989a36b0d127a42909a30f472d55 100644 (file)
@@ -1,4 +1,8 @@
+%nocache
+
 403
 ===
 
 **Forbidden**
+
+<<reflink>>
index 7596bdd56db8db00afaab1e790ca747cad81b656..f54bad58d7d7319dadc57f8fc9503dc2a60101ec 100644 (file)
@@ -1,4 +1,8 @@
+%nocache
+
 404
 ===
 
 **page not found**
+
+<<reflink>>