mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 09:59:28 +00:00
contrib/html.sh: link the stylesheet from top level...
... and copy it there in Makefile.
This commit is contained in:
parent
a5ac5138be
commit
a4d4365735
3 changed files with 7 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -7,6 +7,7 @@
|
||||||
*.rej
|
*.rej
|
||||||
|
|
||||||
# html files (as generated from markdown)
|
# html files (as generated from markdown)
|
||||||
|
style.css
|
||||||
*.html
|
*.html
|
||||||
|
|
||||||
# checksums file as used by $ScriptInstallUpdate
|
# checksums file as used by $ScriptInstallUpdate
|
||||||
|
|
|
||||||
7
Makefile
7
Makefile
|
|
@ -7,11 +7,14 @@ LOCAL = $(wildcard *.local.rsc)
|
||||||
WIFI = $(wildcard *.wifi.rsc)
|
WIFI = $(wildcard *.wifi.rsc)
|
||||||
|
|
||||||
MARKDOWN = $(wildcard *.md doc/*.md doc/mod/*.md)
|
MARKDOWN = $(wildcard *.md doc/*.md doc/mod/*.md)
|
||||||
HTML = $(MARKDOWN:.md=.html)
|
HTML = $(MARKDOWN:.md=.html) style.css
|
||||||
|
|
||||||
all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json
|
all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json
|
||||||
|
|
||||||
%.html: %.md contrib/html.sh contrib/html.sh.d/head.html
|
style.css: contrib/general/style.css
|
||||||
|
cp $< $@
|
||||||
|
|
||||||
|
%.html: %.md style.css contrib/html.sh contrib/html.sh.d/head.html
|
||||||
contrib/html.sh $< > $@
|
contrib/html.sh $< > $@
|
||||||
|
|
||||||
%.capsman.rsc: %.template.rsc Makefile
|
%.capsman.rsc: %.template.rsc Makefile
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ set -e
|
||||||
RELTO="$(dirname "${1}")"
|
RELTO="$(dirname "${1}")"
|
||||||
sed \
|
sed \
|
||||||
-e "s|__TITLE__|$(head -n1 "${1}")|" \
|
-e "s|__TITLE__|$(head -n1 "${1}")|" \
|
||||||
-e "s|__STYLE__|$(realpath --relative-to="${RELTO}" contrib/general/style.css)|" \
|
-e "s|__STYLE__|$(realpath --relative-to="${RELTO}" style.css)|" \
|
||||||
< "${0}.d/head.html"
|
< "${0}.d/head.html"
|
||||||
markdown -f toc,idanchor "${1}" | sed \
|
markdown -f toc,idanchor "${1}" | sed \
|
||||||
-e 's/href="\([-_\./[:alnum:]]*\)\.md"/href="\1.html"/g' \
|
-e 's/href="\([-_\./[:alnum:]]*\)\.md"/href="\1.html"/g' \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue