mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 09:59:28 +00:00
contrib/html: add a footer
This commit is contained in:
parent
b4e6cc5b59
commit
9c8feee621
4 changed files with 17 additions and 2 deletions
6
Makefile
6
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)
|
||||
|
|
|
|||
|
|
@ -18,4 +18,7 @@ markdown -f toc,idanchor "${1}" | sed \
|
|||
-e '/<h[1234] /s|-2[1789cd]-||g' -e '/<h[1234] /s|--26-amp-3b-||g' \
|
||||
-e '/The above link may be broken on code hosting sites/s|blockquote|blockquote style="display: none;"|'
|
||||
|
||||
printf '</body></html>'
|
||||
sed \
|
||||
-e "s|__DATE__|${DATE:-$(date --rfc-email)}|" \
|
||||
-e "s|__VERSION__|${VERSION:-unknown}|" \
|
||||
< "${0}.d/foot.html"
|
||||
|
|
|
|||
4
contrib/html.sh.d/foot.html
Normal file
4
contrib/html.sh.d/foot.html
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
<p class="foot">RouterOS Scripts documentation generated on <i>__DATE__</i> for <i>__VERSION__</i></p>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue