From 9c8feee6218db675add9332cfee340f765f4a904 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 12 Nov 2025 17:22:30 +0100 Subject: [PATCH] contrib/html: add a footer --- Makefile | 6 +++++- contrib/html.sh | 5 ++++- contrib/html.sh.d/foot.html | 4 ++++ general/style.css | 4 ++++ 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 contrib/html.sh.d/foot.html diff --git a/Makefile b/Makefile index f841ca2..ecb25bc 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,10 @@ GEN_RSC := $(wildcard *.capsman.rsc *.local.rsc *.wifi.rsc) MARKDOWN := $(wildcard *.md doc/*.md doc/mod/*.md) HTML := $(MARKDOWN:.md=.html) +DATE ?= $(shell date --rfc-email) +VERSION ?= $(shell git symbolic-ref --short HEAD 2>/dev/null)/$(shell git rev-list --count HEAD 2>/dev/null)/$(shell git rev-parse --short=8 HEAD 2>/dev/null) +export DATE VERSION + .PHONY: all checksums docs rsc clean all: checksums docs rsc @@ -19,7 +23,7 @@ checksums.json: contrib/checksums.sh $(ALL_RSC) docs: $(HTML) -%.html: %.md general/style.css contrib/html.sh contrib/html.sh.d/head.html +%.html: %.md general/style.css contrib/html.sh contrib/html.sh.d/head.html contrib/html.sh.d/foot.html contrib/html.sh $< > $@ rsc: $(GEN_RSC) diff --git a/contrib/html.sh b/contrib/html.sh index 0b89724..2fe9ef7 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -18,4 +18,7 @@ markdown -f toc,idanchor "${1}" | sed \ -e '/' +sed \ + -e "s|__DATE__|${DATE:-$(date --rfc-email)}|" \ + -e "s|__VERSION__|${VERSION:-unknown}|" \ + < "${0}.d/foot.html" diff --git a/contrib/html.sh.d/foot.html b/contrib/html.sh.d/foot.html new file mode 100644 index 0000000..106c2bd --- /dev/null +++ b/contrib/html.sh.d/foot.html @@ -0,0 +1,4 @@ + +

RouterOS Scripts documentation generated on __DATE__ for __VERSION__

+ + diff --git a/general/style.css b/general/style.css index 018ccc4..73b0921 100644 --- a/general/style.css +++ b/general/style.css @@ -43,6 +43,10 @@ img.logo { float: left; border-radius: 50%; } +p.foot { + color: #777; + text-align: center; +} p.heading { margin: 0px; font-weight: bold;