Skip to content

Commit

Permalink
Update utils.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkato authored Dec 24, 2024
1 parent 03908cb commit a3af428
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,13 @@ export async function getDoc(slug: string) {
error(404);
}

let folder = slug.replace("/docs/", "");
if (folder === doc.metadata.title) {
folder = "Topics";
}

return {
section: folder,
component: doc.default,
metadata: doc.metadata,
title: doc.metadata.title,
Expand Down

0 comments on commit a3af428

Please sign in to comment.