deployment-script: cut the ./ from the start of the chapter link

master
BodgeMaster 2023-12-06 18:59:46 +01:00
parent f26ab58f32
commit d5da54c11d
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ cp html_resources/index_template.html index.html
function genlinks { function genlinks {
for FILE in $(find . -maxdepth 1 -type f -name "??-*.html" | sort); do for FILE in $(find . -maxdepth 1 -type f -name "??-*.html" | sort); do
echo -ne " <li><a href=\"$FILE\">\n" echo -ne " <li><a href=\"$FILE\">\n"
echo -n " $(sed -e 's/-.*//' <<< "$FILE") <span class="'"chapter">' echo -n " $(sed -e 's|^\./||;s/-.*//' <<< "$FILE") <span class="'"chapter">'
grep -oe "<title>.*</title>" $FILE | sed -e 's/<title> //;s| </title>|</span>|' grep -oe "<title>.*</title>" $FILE | sed -e 's/<title> //;s| </title>|</span>|'
echo " </a></li>" echo " </a></li>"
done done