diff --git a/scripts/redirects.csv b/scripts/redirects.csv new file mode 100644 index 00000000..3abccc67 --- /dev/null +++ b/scripts/redirects.csv @@ -0,0 +1,5 @@ +old,new +about,/ +cv,https://gist.github.com/opdavies/d096d553b80140a342d4 +portfolio,/ +work,/ diff --git a/scripts/redirects.php b/scripts/redirects.php new file mode 100644 index 00000000..cdc11110 --- /dev/null +++ b/scripts/redirects.php @@ -0,0 +1,34 @@ +#!/usr/bin/env php + + 1) { + $templateData = [ + '%DESTINATION%' => $data[1], + ]; + + $output = strtr($template, $templateData); + file_put_contents("source/{$data[0]}.html", $output); + + echo "Written to {$data[0]}.html\n"; + } + } +} + +fclose($handle); diff --git a/source/cv.html b/source/cv.html deleted file mode 100644 index 6234b488..00000000 --- a/source/cv.html +++ /dev/null @@ -1,4 +0,0 @@ ---- -layout: redirect -destination: https://gist.github.com/opdavies/d096d553b80140a342d4 ----