Skip to content

Commit

Permalink
fix: redirect better on tag pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ajfisher committed Dec 31, 2024
1 parent d0be833 commit d06ecb6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/handlers/gatsby_index_redirect.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ export const handler = async (event) => {
}

if (uri.endsWith('/tagged/sms/')) {
request.uri = 'https://ajfisher.me/tagged/mobile/';
request.uri = '/tagged/mobile/';
}
if (uri.endsWith('/tagged/data/')) {
request.uri = 'https://ajfisher.me/tagged/data-science/';
request.uri = '/tagged/data-science/';
}

if (request.uri.endsWith('/')) {
Expand All @@ -33,6 +33,7 @@ export const handler = async (event) => {
request.uri += '/index.html';
}

console.log(request.uri);
return request;
};

0 comments on commit d06ecb6

Please sign in to comment.