summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreudoxia <uplink@distress.network>2020-12-26 02:00:31 -0500
committereudoxia <uplink@distress.network>2020-12-26 02:00:31 -0500
commitab80134eb6f21f9d66e5604ba536eeba26387152 (patch)
tree71159c45505c44acd13529aa40a0c467b225f601
parent9997e377dcc140ff2ec7f97b73822ffa0f14ed99 (diff)
md.sh: title comment from nav.html is removed in embed; other small fixes
-rwxr-xr-xmd-header1
-rwxr-xr-xmd.sh5
2 files changed, 3 insertions, 3 deletions
diff --git a/md-header b/md-header
index f3c9c9e..34062e7 100755
--- a/md-header
+++ b/md-header
@@ -13,7 +13,6 @@
<title>#</title>
<meta name="description" content="#" />
</head>
-
<body>
<header>
<div class="bomber">#</div>
diff --git a/md.sh b/md.sh
index 86de05b..8ba076f 100755
--- a/md.sh
+++ b/md.sh
@@ -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