mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-07 10:29:29 +00:00
contrib/html.sh: include stylesheet via link
This commit is contained in:
parent
4b8e8adb2d
commit
a5ac5138be
3 changed files with 38 additions and 11 deletions
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
set -e
|
||||
|
||||
sed "s|__TITLE__|$(head -n1 "${1}")|" < "${0}.d/head.html"
|
||||
RELTO="$(dirname "${1}")"
|
||||
sed \
|
||||
-e "s|__TITLE__|$(head -n1 "${1}")|" \
|
||||
-e "s|__STYLE__|$(realpath --relative-to="${RELTO}" contrib/general/style.css)|" \
|
||||
< "${0}.d/head.html"
|
||||
markdown -f toc,idanchor "${1}" | sed \
|
||||
-e 's/href="\([-_\./[:alnum:]]*\)\.md"/href="\1.html"/g' \
|
||||
-e '/<h[1234] /s| id="\(.*\)">| id="\L\1">|'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue