This commit is contained in:
Miloslav Ciz 2024-02-06 07:30:19 +01:00
parent 91a4ce4727
commit 810a5262e4
8 changed files with 47 additions and 39 deletions

View file

@ -23,21 +23,22 @@ printf "# Wiki Files\n\nThis is an autogenerated page listing all pages.\n\n" >
firstFile=true
for f in *.md; do
fname=$(echo "$f" | sed "s/\.md//g")
fname=$(echo "$f" | sed "s/\.md//g")
if [ "$firstFile" = true ] ; then
firstFile=false
else
printf " -- " >> $FILELIST.md
fi
if [ "$firstFile" = true ] ; then
firstFile=false
else
printf " -- " >> $FILELIST.md
fi
printf "**[$fname]($f)** ($(cat $f | wc -l))" >> $FILELIST.md
done
printf "**[$fname]($f)** ($(cat $f | wc -l))" >> $FILELIST.md
f2="html/${fname}.html"
echo $HEADER > $f2
cmark-gfm -e table $f | sed "s/\.md\"/.html\"/g" >> $f2
echo $FOOTER >> $f2
for f in *.md; do
fname=$(echo "$f" | sed "s/\.md//g")
f2="html/${fname}.html"
echo $HEADER > $f2
cmark-gfm -e table $f | sed "s/\.md\"/.html\"/g" >> $f2
echo $FOOTER >> $f2
done
# this uses a C program to mark dead links, you can optionally remove this
@ -46,8 +47,8 @@ cd html
cp ../mark_dead_links .
for f in *.html; do
cat $f | ./mark_dead_links > tmp
mv tmp $f
cat $f | ./mark_dead_links > tmp
mv tmp $f
done
rm mark_dead_links