Commit 61dccb69 authored by Karol Herbst's avatar Karol Herbst 🐧

fix link compatibility with old wiki

parent abe77759
Pipeline #207799 passed with stage
in 48 seconds
......@@ -10,6 +10,7 @@ test:
stage: test
script:
- ikiwiki --setup nouveau.yml
- ./scripts/gen_compat_links.sh public/
artifacts:
expose_as: 'Preview'
paths:
......@@ -21,6 +22,7 @@ pages:
stage: deploy
script:
- ikiwiki --setup nouveau.yml
- ./scripts/gen_compat_links.sh public/
artifacts:
paths:
- public
......
#!/bin/bash
outdir=$1
while read line; do
path=${line%.*}
file=${line##*/}
mkdir -p "$path"
cat <<EOF > "$path"/index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url='../$file'" />
</head>
<body>
<p>Please follow <a href="../$file">this link</a>.</p>
</body>
</html>
EOF
done < <(find $outdir -type f -iname "*.html")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment