From 192cfd534e112e61f5398c9ecee813ec287a4318 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 6 Jun 2019 19:49:28 +0100 Subject: [PATCH] Automatically add redirects for external URLs --- source/_redirects.html.twig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/_redirects.html.twig b/source/_redirects.html.twig index ffde6a31..351a17c0 100644 --- a/source/_redirects.html.twig +++ b/source/_redirects.html.twig @@ -1,4 +1,5 @@ --- +use: [posts] --- /about / /articles/2010/04/05/style-drupal-6s-taxonomy-lists-php-css-and-jquery /articles/style-drupal-6s-taxonomy-lists-php-css-and-jquery @@ -154,3 +155,7 @@ /twitter {{ site.twitter.url }} /work /experience /youtube {{ site.youtube.channel.url }} + +{% for post in data.posts if post.external_url %} +/{{ post.url }} {{ post.external_url }} +{% endfor %}