diff options
author | eudoxia <uplink@distress.network> | 2020-12-26 02:00:31 -0500 |
---|---|---|
committer | eudoxia <uplink@distress.network> | 2020-12-26 02:00:31 -0500 |
commit | ab80134eb6f21f9d66e5604ba536eeba26387152 (patch) | |
tree | 71159c45505c44acd13529aa40a0c467b225f601 | |
parent | 9997e377dcc140ff2ec7f97b73822ffa0f14ed99 (diff) |
md.sh: title comment from nav.html is removed in embed; other small fixes
-rwxr-xr-x | md-header | 1 | ||||
-rwxr-xr-x | md.sh | 5 |
2 files changed, 3 insertions, 3 deletions
@@ -13,7 +13,6 @@ <title>#</title> <meta name="description" content="#" /> </head> - <body> <header> <div class="bomber">#</div> @@ -85,6 +85,7 @@ printf "[ok] \tmeta description\n" if [ -f $(echo $IN | cut -f 1 -d /)/nav.html ] ; then NAVLINE=$(grep -n '<nav>' $OUT | cut -f 1 -d :) ; sed "${NAVLINE}r $(echo $OUT | cut -f 1 -d /)/nav.html" -i'' $OUT ; +sed '/^<!--title:/d' -i'' $OUT ; printf "[ok] \tsitemap\n" ; fi @@ -135,7 +136,7 @@ cat $tmp | while IFS='' read -r data ; do # find old id in output, replace with new id IDLINE=$(grep -ne "^<h[[:digit:]] id=" $OUT | fzf -f "$(echo $HEADER | unesc)" | head -n 1 | cut -f 1 -d :) ; if [ "$IDLINE" ] ; then - sed -e "${IDLINE}s;id=\".*\">.*</h;id=\"${ID}\">${HEADER}</h;" -i'' $OUT ; + sed "${IDLINE}s;id=\".*\">.*</h;id=\"${ID}\">${HEADER}</h;" -i'' $OUT ; printf "\tassembled header: %s\n" "$(echo $HEADER | unesc)" ; fi ; done @@ -147,7 +148,7 @@ echo '</nav>' >> $tmp # get toc line number in output, insert data from tempfile -TOCLINE=$(grep -n 'end of header' $OUT | cut -f 1 -d :) +TOCLINE=$(grep -n '<!-- end of header -->' $OUT | cut -f 1 -d :) sed "${TOCLINE}r $tmp" -i'' $OUT rm $tmp # cleanup |