diff --git a/src/data/link-groups/1.md b/src/data/link-groups/1.md index 42f014a47..43245ff55 100644 --- a/src/data/link-groups/1.md +++ b/src/data/link-groups/1.md @@ -1,4 +1,5 @@ --- +byte-byte-go: https://blog.bytebytego.com/archive speedup-js: https://marvinh.dev/blog/speeding-up-javascript-ecosystem/ 23-min-ts: https://www.youtube.com/watch?v=YmxwicpROps bun-vs-node: https://www.youtube.com/watch?v=qCX8rw4qOSA diff --git a/src/lib/link-group.ts b/src/lib/link-group.ts index 2b765561b..960d8d1ea 100644 --- a/src/lib/link-group.ts +++ b/src/lib/link-group.ts @@ -26,17 +26,14 @@ function linkGroupPathToId(filePath: string): string { */ export async function getAllLinkGroups(): Promise { const linkGroups = await import.meta.glob( - '/src/link-groups/*.md', + '/src/data/link-groups/*.md', { eager: true, } ); - const linkGroupFiles = Object.values(linkGroups); - const enrichedLinkGroups = linkGroupFiles.map((linkGroupFile) => ({ + return Object.values(linkGroups).map((linkGroupFile) => ({ ...linkGroupFile, id: linkGroupPathToId(linkGroupFile.file), })); - - return enrichedLinkGroups; } diff --git a/src/pages/g/[linkGroupId]/[linkId].astro b/src/pages/g/[linkGroupId]/[linkId].astro index 2c26f8f45..a63e52f4a 100644 --- a/src/pages/g/[linkGroupId]/[linkId].astro +++ b/src/pages/g/[linkGroupId]/[linkId].astro @@ -34,6 +34,6 @@ const fullUrl = linkGroup.frontmatter[linkId!];

Redirecting ..

Click the link below if you are not redirected automatically.

-

{fullUrl}

+

{fullUrl}