From 2938c0a7161daff038d45b9e2f2d27c39a613210 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 30 Oct 2025 10:19:30 +0100 Subject: [PATCH] contrib/html.sh: link the stylesheet from top level... ... and copy it there in Makefile. --- .gitignore | 1 + Makefile | 7 +++++-- contrib/html.sh | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 8abdc28..9d27373 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.rej # html files (as generated from markdown) +style.css *.html # checksums file as used by $ScriptInstallUpdate diff --git a/Makefile b/Makefile index 0265a51..a741fef 100644 --- a/Makefile +++ b/Makefile @@ -7,11 +7,14 @@ LOCAL = $(wildcard *.local.rsc) WIFI = $(wildcard *.wifi.rsc) MARKDOWN = $(wildcard *.md doc/*.md doc/mod/*.md) -HTML = $(MARKDOWN:.md=.html) +HTML = $(MARKDOWN:.md=.html) style.css all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json -%.html: %.md contrib/html.sh contrib/html.sh.d/head.html +style.css: contrib/general/style.css + cp $< $@ + +%.html: %.md style.css contrib/html.sh contrib/html.sh.d/head.html contrib/html.sh $< > $@ %.capsman.rsc: %.template.rsc Makefile diff --git a/contrib/html.sh b/contrib/html.sh index 194a7cd..287119f 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -5,7 +5,7 @@ set -e RELTO="$(dirname "${1}")" sed \ -e "s|__TITLE__|$(head -n1 "${1}")|" \ - -e "s|__STYLE__|$(realpath --relative-to="${RELTO}" contrib/general/style.css)|" \ + -e "s|__STYLE__|$(realpath --relative-to="${RELTO}" style.css)|" \ < "${0}.d/head.html" markdown -f toc,idanchor "${1}" | sed \ -e 's/href="\([-_\./[:alnum:]]*\)\.md"/href="\1.html"/g' \