mirror of
https://github.com/10h30/astroplate.git
synced 2026-07-18 06:03:27 +09:00
config ln array changed
This commit is contained in:
@@ -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");
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user