remove .html when on ~cafe server

This commit is contained in:
jan6 2021-11-12 03:05:11 +02:00
parent 025d0459e9
commit f9a92d0118
1 changed files with 4 additions and 1 deletions

View File

@ -24,7 +24,6 @@ echo "generating site"
#. in reference to src/
for path in . ./wiki;do
tmpindex=$(mktemp --suffix '.md') # for generating list of markdown links for index.html
path="src/$path"
cat "$path/index.md" > $tmpindex
@ -52,6 +51,8 @@ for path in . ./wiki;do
if [ "$no_ext" = "1" ];then
sed -e 's|\(<a href="https://tilde.cafe/wiki/[^/]\+\).html">|\1">|g'\
-e 's|\(<a href="[^/]\+\).html">|\1">|g'
else
cat
fi |
cat inc/header.html - inc/footer.html >"dist/$dir/$filename.html"
# ' \;
@ -73,6 +74,8 @@ markdown "$tmpindex" |
if [ "$no_ext" = "1" ];then
sed -e 's|\(<a href="https://tilde.cafe/wiki/[^/]\+\).html">|\1">|g'\
-e 's|\(<a href="[^/]\+\).html">|\1">|g'
else
cat
fi |
cat inc/header.html - inc/footer.html > dist/wiki/index.html
rm "$tmpindex"