Update link-groups

feat/devops-roadmap
Kamran Ahmed 1 year ago
parent 40d25c43f4
commit 0f80f26d17
  1. 1
      src/data/link-groups/1.md
  2. 7
      src/lib/link-group.ts
  3. 2
      src/pages/g/[linkGroupId]/[linkId].astro

@ -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

@ -26,17 +26,14 @@ function linkGroupPathToId(filePath: string): string {
*/
export async function getAllLinkGroups(): Promise<LinkGroupFileType[]> {
const linkGroups = await import.meta.glob<LinkGroupFileType>(
'/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;
}

@ -34,6 +34,6 @@ const fullUrl = linkGroup.frontmatter[linkId!];
<h2 class='text-xl font-bold'>Redirecting ..</h2>
<p>Click the link below if you are not redirected automatically.</p>
<p><a href={fullUrl} class='underline text-blue-700'>{fullUrl}</a></p>
<p><a href={fullUrl} class='text-blue-700 underline'>{fullUrl}</a></p>
</div>
</SkeletonLayout>

Loading…
Cancel
Save