config ln array changed

This commit is contained in:
Al Murad Uzzaman
2024-05-16 17:11:25 +06:00
parent 97d6f22dcb
commit c137b8afcd
24 changed files with 200 additions and 362 deletions
+2 -4
View File
@@ -1,16 +1,14 @@
---
import { getSinglePage } from "@/lib/contentParser.astro";
import { slugify } from "@/lib/utils/textConverter";
import type { ContentEntryMap } from "astro:content";
import { getCollection } from "astro:content";
// get taxonomy from frontmatter
export const getTaxonomy = async (collection: any, name: string) => {
// const singlePages = await getSinglePage(collection);
const singlePages = await getCollection(
collection as keyof ContentEntryMap,
({ id }) => {
({ id }: any) => {
return id.startsWith("blog") && !id.endsWith("-index.md");
}
);
@@ -31,7 +29,7 @@ export const getAllTaxonomy = async (collection: any, name: string) => {
// const singlePages = await getSinglePage(collection);
const singlePages = await getCollection(
collection as keyof ContentEntryMap,
({ id }) => {
({ id }: any) => {
return id.startsWith("blog") && !id.endsWith("-index.md");
}
);