Compare commits

...

2 commits

Author SHA1 Message Date
Christian Hesse
c8f6f7a4b5 contrib/static-html: add badges 2025-11-18 19:14:10 +01:00
Christian Hesse
7f0da6311b contrib/static-html: find static html files by comment 2025-11-18 19:13:57 +01:00
5 changed files with 21 additions and 3 deletions

View file

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

6
contrib/badges.md Normal file
View file

@ -0,0 +1,6 @@
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.15-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -1,3 +1,4 @@
<!-- static html //-->
<!DOCTYPE html><html lang="en">
<head><meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>RouterOS Scripts :: Logo Color Changer</title>
@ -16,6 +17,8 @@
<h1>Logo Color Changer</h1>
<!-- badges here //-->
<p><a href="../README.md">⬅️ Go back to main README</a></p>
<blockquote style="/* display */"><p>💡️ <strong>Hint</strong>: This site or links

View file

@ -1,3 +1,4 @@
<!-- static html //-->
<!DOCTYPE html><html lang="en">
<head><meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>RouterOS Scripts :: Notification Generator</title>
@ -16,6 +17,8 @@
<h1>Notification Generator</h1>
<!-- badges here //-->
<p><a href="../README.md">⬅️ Go back to main README</a></p>
<blockquote style="/* display */"><p>💡️ <strong>Hint</strong>: This site or links

View file

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