mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-03-04 21:19:36 +00:00
generate valid HTML, including head & style
This commit is contained in:
parent
6b0c9ab17d
commit
7a790b88c0
2 changed files with 20 additions and 2 deletions
6
Makefile
6
Makefile
|
|
@ -11,8 +11,10 @@ HTML = $(MARKDOWN:.md=.html)
|
|||
|
||||
all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json
|
||||
|
||||
%.html: %.md Makefile
|
||||
markdown $< | sed 's/href="\([-_\./[:alnum:]]*\)\.md"/href="\1.html"/g' > $@
|
||||
%.html: %.md contrib/head.html Makefile
|
||||
sed 's|__TITLE__|$(shell head -n1 $<)|' < contrib/head.html > $@
|
||||
markdown -f toc,idanchor $< | sed -e 's/href="\([-_\./[:alnum:]]*\)\.md"/href="\1.html"/g' -e '/<h[1234] /s| id="\(.*\)">| id="\L\1">|' >> $@
|
||||
printf '</body></html>' >> $@
|
||||
|
||||
%.capsman.rsc: %.template.rsc Makefile
|
||||
sed -e '/\/interface\/wifi\//d' -e '/\/interface\/wireless\//d' -e 's|%TEMPL%|.capsman|' \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue