content folder name chanded && fn added

This commit is contained in:
Al Murad Uzzaman
2024-05-18 22:20:40 +06:00
parent 76f1b5b6c1
commit 742c67c3d5
9 changed files with 87 additions and 86 deletions
+2 -5
View File
@@ -4,8 +4,7 @@ import Base from "@/layouts/Base.astro";
import { getListPage } from "@/lib/contentParser.astro";
import { supportedLang } from "@/lib/utils/i18nUtils";
import { markdownify } from "@/lib/utils/textConverter";
import type { ContentEntryMap } from "astro:content";
import type { ContentCollectionKey } from "astro:content";
import type { ContentCollectionKey, ContentEntryMap } from "astro:content";
export function getStaticPaths() {
const paths = supportedLang.map((lang) => ({
@@ -17,11 +16,9 @@ export function getStaticPaths() {
const { lang } = Astro.params;
const about: any = await getListPage(
"about" as ContentCollectionKey,
lang as keyof ContentEntryMap
lang as keyof ContentEntryMap,
);
console.log(about);
const { Content } = await about[0].render();
const { title, description, meta_title, image } = about[0].data;
---