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 "[build.sh] Failure."
#temporarily create redirects for old, non-slug links
#this portion can be removed after gitlab fixes custom 404s
echo [build.sh] Generating redirects…
cat -n src/redirect/redirect.txt | while read n f; do cp src/redirect/redirect.html $f || echo "[build.sh] 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|gitlab.io\/|gitlab.io\/${f%.html}\/|g" $f; done
while read r; do
sed -i "s|gitlab.io\/|gitlab.io\/${r%.html}\/|g" $r
sed -i "s|gitlab.io\/public\/|gitlab.io\/|g" $r
done <src/redirect/redirect.txt
......@@ -20,4 +20,4 @@ public/tech/customizing-tildes.html
public/tech/foss-alternatives.html
public/tech/recommended-extensions.html
public/tildes/how-to-guide.html
public/tildes/introduction.html
\ No newline at end of file
public/tildes/introduction.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