fix bad link in footer for sourcecode

This commit is contained in:
rick 2023-01-13 20:12:02 +01:00
parent f0493e9d4b
commit 08562fadb4
Signed by: Rick
GPG key ID: 4A6223D66294EB20
2 changed files with 6 additions and 2 deletions

View file

@ -8,7 +8,7 @@
</div>
<div id="footer-text">
<p>Site sans cookie, ni JS, ni tracker.</p>
<p><a href="https://git.gyiwr.tf/gyiwr/tree/%file%">Code source de la page</a></p>
<p><a href="https://git.gyiwr.tf/gyiwr/tree/%gitfile%">Code source de la page</a></p>
<p id="footer-contact">2023 (c) rick <span id="footer-link-email">&lt;rick [at] gnous [dot] eu&gt;</span></p>
</div>
<a id="fsf" href="https://my.fsf.org/join">

View file

@ -126,6 +126,10 @@ do
cat $tmpHeader > $file
# on extrait le bloc contenant les link, on les enlève et rajoute
# <link />
# merci
# https://www.theunixschool.com/2012/12/sed-10-examples-to-print-lines-from-file.html
# https://stackoverflow.com/questions/68573654/copy-a-content-from-one-file-and-need-to-replace-in-another-file-using-sed
# https://unix.stackexchange.com/questions/26284/how-can-i-use-sed-to-replace-a-multi-line-string
# TODO pouvoir mettre plusieurs lignes link
newHeader=$(sed -n -e "/%link%/,/%endlink%/p" $files/$l/$i | sed -e "/%link%/d;/%endlink%/d" -e 's/\//\\\//g' -e "i<link " -e 'a\ \\\/>' | tr -d "\n")
@ -149,7 +153,7 @@ do
sed -i -e "s/img alt=\"$l/img id=\"choose\" alt=\"$l/" $file
sed -i -e "s/%file%/$i/" $file
sed -i -e "s/%gitfile%/$l\/$i/" $file
sed -i -e "s/%gitfile%/lang\/$l\/$i/" $file
sed -i -e "s/%lang%/$l/" $file
done
done