contrib/html: simplify handling of relative paths

This commit is contained in:
Christian Hesse 2025-11-17 11:03:02 +01:00
parent 269e1688e6
commit 6eeebb010d
2 changed files with 7 additions and 10 deletions

View file

@ -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 \