From ed9dee3c5f4c45da17d67fb685436d563c929ff0 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 17 Nov 2025 11:03:02 +0100 Subject: [PATCH] contrib/html: simplify handling of relative paths --- contrib/html.sh | 7 ++----- contrib/html.sh.d/head.html | 10 +++++----- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/contrib/html.sh b/contrib/html.sh index 39589da..098ba46 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -6,11 +6,8 @@ RELTO="$(dirname "${1}")" sed \ -e "s|__TITLE__|$(head -n1 "${1}")|" \ - -e "s|__STYLE__|$(realpath --relative-to="${RELTO}" general/style.css)|" \ - -e "s|__LOGO__|$(realpath --relative-to="${RELTO}" logo.png)|" \ - -e "s|__EWORM__|$(realpath --relative-to="${RELTO}" general/eworm-meadow.avif)|" \ - -e "s|__QR_CODE__|$(realpath --relative-to="${RELTO}" general/qr-code.png)|" \ - -e "s|__CLIPBOARD__|$(realpath --relative-to="${RELTO}" general/clipboard.js)|" \ + -e "s|__GENERAL__|$(realpath --relative-to="${RELTO}" general/)|" \ + -e "s|__ROOT__|$(realpath --relative-to="${RELTO}" ./)|" \ < "${0}.d/head.html" markdown -f toc,idanchor "${1}" | sed \ diff --git a/contrib/html.sh.d/head.html b/contrib/html.sh.d/head.html index 861a87b..656a63c 100644 --- a/contrib/html.sh.d/head.html +++ b/contrib/html.sh.d/head.html @@ -1,14 +1,14 @@ RouterOS Scripts :: __TITLE__ - - - + + + - - + +
eworm on meadowQR code: rsc.eworm.deeworm on meadowQR code: rsc.eworm.de RouterOS Scripts
a collection of scripts for MikroTik RouterOS