From b0f05146b1200322be2429b4a10d1a60207b38f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Wed, 11 May 2022 17:23:10 +0200 Subject: [PATCH] introduce reflink macro --- macros/reflink | 8 ++++++++ pages/[wiki]/403/#page.md | 4 ++++ pages/[wiki]/404/#page.md | 4 ++++ 3 files changed, 16 insertions(+) create mode 100755 macros/reflink diff --git a/macros/reflink b/macros/reflink new file mode 100755 index 0000000..1b38c15 --- /dev/null +++ b/macros/reflink @@ -0,0 +1,8 @@ +#!/bin/sh + +. "$_EXEC/cgilite/cgilite.sh" + +title="$(HTML "$1")" +ref="$(HEADER Referer)" + +printf '%s' "${ref:-./}" "${title:-Return}" diff --git a/pages/[wiki]/403/#page.md b/pages/[wiki]/403/#page.md index 66ea5e2..d15309b 100644 --- a/pages/[wiki]/403/#page.md +++ b/pages/[wiki]/403/#page.md @@ -1,4 +1,8 @@ +%nocache + 403 === **Forbidden** + +<> diff --git a/pages/[wiki]/404/#page.md b/pages/[wiki]/404/#page.md index 7596bdd..f54bad5 100644 --- a/pages/[wiki]/404/#page.md +++ b/pages/[wiki]/404/#page.md @@ -1,4 +1,8 @@ +%nocache + 404 === **page not found** + +<> -- 2.39.2