fix(web/homepage): Ensure old blog links keep working

This commit is contained in:
Vincent Ambo 2020-02-09 00:30:51 +00:00
parent 69b6ff26c3
commit 0fd762e2d0

View file

@ -14,9 +14,9 @@ let
inherit (pkgs.third_party) ;
oldRedirects = lib.concatStringsSep "\n" (map (post: ''
location ~* ^(en)?/${post.oldKey} {
location ~* ^(/en)?/${post.oldKey} {
# TODO(tazjin): 301 once this works
return 302 /${post.key};
return 302 /blog/${post.key};
}
'') (filter (hasAttr "oldKey") blog.posts));