contrib/static-html: find static html files by comment

This commit is contained in:
Christian Hesse 2025-11-18 18:53:29 +01:00
parent c5c9f869d2
commit 7f0da6311b
4 changed files with 6 additions and 3 deletions

View file

@ -1,10 +1,10 @@
# Makefile # Makefile
HTML := $(wildcard *.html) STATIC_HTML := $(shell grep -xl '<!-- static html //-->' *.html)
.PHONY: all docs .PHONY: all docs
all: docs all: docs
docs: static-html.sh $(HTML) docs: static-html.sh $(STATIC_HTML)
./static-html.sh $(HTML) ./static-html.sh $(STATIC_HTML)

View file

@ -1,3 +1,4 @@
<!-- static html //-->
<!DOCTYPE html><html lang="en"> <!DOCTYPE html><html lang="en">
<head><meta http-equiv="content-type" content="text/html; charset=UTF-8"> <head><meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>RouterOS Scripts :: Logo Color Changer</title> <title>RouterOS Scripts :: Logo Color Changer</title>

View file

@ -1,3 +1,4 @@
<!-- static html //-->
<!DOCTYPE html><html lang="en"> <!DOCTYPE html><html lang="en">
<head><meta http-equiv="content-type" content="text/html; charset=UTF-8"> <head><meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>RouterOS Scripts :: Notification Generator</title> <title>RouterOS Scripts :: Notification Generator</title>

View file

@ -5,4 +5,5 @@ set -e
sed -i \ sed -i \
-e '/href=/s|\.md|\.html|' \ -e '/href=/s|\.md|\.html|' \
-e '/blockquote/s|/\* display \*/|display: none;|' \ -e '/blockquote/s|/\* display \*/|display: none;|' \
-e '/<!-- static html \/\/-->/d' \
"${@}" "${@}"