diff --git a/src/content/content.ts b/src/content/content.ts index 67d824a..9ba5892 100644 --- a/src/content/content.ts +++ b/src/content/content.ts @@ -26,8 +26,8 @@ const tags = defineCollection({ type: "content", schema: z.object({ name: z.string(), - }) -}) + }), +}); export const collections = { posts, diff --git a/src/content/tags/math.md b/src/content/tags/math.md index b8d1075..8a01af9 100644 --- a/src/content/tags/math.md +++ b/src/content/tags/math.md @@ -1,4 +1,5 @@ --- name: "Math" --- -`` \ No newline at end of file + +`` diff --git a/src/utils.ts b/src/utils.ts index 117f428..9a02f8f 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,4 +1,8 @@ -import {type CollectionEntry, type ContentEntryMap, getCollection} from "astro:content"; +import { + type CollectionEntry, + type ContentEntryMap, + getCollection, +} from "astro:content"; // https://github.com/hellotham/hello-astro/blob/e05706cf488bcec6e4c5494a622eedfc4e47d763/src/config.ts#L55C1-L62C2 export async function getPosts(collection: keyof ContentEntryMap) { @@ -44,7 +48,9 @@ export function getDaySuffix(date: Date): string { return suffix; } -export async function getTagsBySlug(postTags: string[]): Promise[]> { +export async function getTagsBySlug( + postTags: string[], +): Promise[]> { const allTags: CollectionEntry<"tags">[] = await getCollection("tags"); const tags: CollectionEntry<"tags">[] = []; postTags.forEach((postTag) => { @@ -53,4 +59,4 @@ export async function getTagsBySlug(postTags: string[]): Promise