deployment-script: cut the ./ from the start of the chapter link
parent
f26ab58f32
commit
d5da54c11d
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue