Skip to content

Commit

Permalink
Allow /about URL variants
Browse files Browse the repository at this point in the history
  • Loading branch information
phgn0 committed Feb 29, 2024
1 parent d483f97 commit 1904ef0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/api/src/common/postType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ export function getPostType(pathname: string) {
if (pathname === "") {
pathname = "/about";
}
// Allow /about variants like /about-me but not article slugs
if (pathname.includes("about") && pathname.length <= 20) {
pathname = "/about";
}

if (pathname === "/about") {
return PostType.ABOUT;
Expand Down

0 comments on commit 1904ef0

Please sign in to comment.