Commit b19e1158 authored by deing's avatar deing

Merge branch 'redirect' into 'master'

Fix redirects (again).

See merge request !12
parents 9612b829 75423a8d
Pipeline #48863028 canceled with stage
......@@ -50,6 +50,9 @@ cp src/favicon/* public/ || echo "[] Failure."
#temporarily create redirects for old, non-slug links
#this portion can be removed after gitlab fixes custom 404s
echo [] Generating redirects…
cat -n src/redirect/redirect.txt | while read n f; do cp src/redirect/redirect.html $f || echo "[] Failure."; done
<src/redirect/redirect.txt xargs -I % cp src/redirect/redirect.html %
#fix redirects to slugs instead of wiki index
cat -n src/redirect/redirect.txt | while read n f; do find public/ -name $f && sed -i "s|\/|\/${f%.html}\/|g" $f; done
while read r; do
sed -i "s|\/|\/${r%.html}\/|g" $r
sed -i "s|\/public\/|\/|g" $r
done <src/redirect/redirect.txt
......@@ -20,4 +20,4 @@ public/tech/customizing-tildes.html
\ No newline at end of file
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