mirror of
https://github.com/10h30/astroplate.git
synced 2026-07-17 13:43:29 +09:00
homepage content changed
This commit is contained in:
@@ -14,18 +14,18 @@ const BLOG_FOLDER = "blog";
|
||||
|
||||
const { slug, lang } = Astro.params;
|
||||
|
||||
const postIndex = await getCollection(
|
||||
const postIndex: any = await getCollection(
|
||||
lang as keyof ContentEntryMap,
|
||||
({ id }: any) => {
|
||||
return id.startsWith(BLOG_FOLDER);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
const posts = await getCollection(
|
||||
lang as keyof ContentEntryMap,
|
||||
({ id }: any) => {
|
||||
return id.startsWith(BLOG_FOLDER) && !id.endsWith("-index.md");
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
const langCollection: keyof ContentEntryMap = lang as keyof ContentEntryMap;
|
||||
@@ -48,7 +48,7 @@ export async function getStaticPaths() {
|
||||
lang as keyof ContentEntryMap,
|
||||
({ id }: any) => {
|
||||
return id.startsWith(BLOG_FOLDER) && !id.endsWith("-index.md");
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
const totalPages = Math.ceil(posts.length / config.settings.pagination);
|
||||
@@ -65,7 +65,7 @@ export async function getStaticPaths() {
|
||||
}
|
||||
|
||||
return langPaths;
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
return paths.flat();
|
||||
|
||||
Reference in New Issue
Block a user