changed the content folder structure && fixed breadcrumps

This commit is contained in:
Al Murad Uzzaman
2024-05-23 15:39:53 +06:00
parent 521fd4804d
commit d5e012e6f8
54 changed files with 295 additions and 60 deletions
+2 -5
View File
@@ -4,7 +4,7 @@ import Base from "@/layouts/Base.astro";
import { getListPage } from "@/lib/contentParser.astro";
import { supportedLang } from "@/lib/utils/languageParser";
import { markdownify } from "@/lib/utils/textConverter";
import type { ContentCollectionKey, ContentEntryMap } from "astro:content";
import type { ContentEntryMap } from "astro:content";
export function getStaticPaths() {
const paths = supportedLang.map((lang) => ({
@@ -14,10 +14,7 @@ export function getStaticPaths() {
}
const { lang } = Astro.params;
const about: any = await getListPage(
"about" as ContentCollectionKey,
lang as keyof ContentEntryMap
);
const about = await getListPage("about", lang as keyof ContentEntryMap);
const { Content } = await about[0].render();
const { title, description, meta_title, image } = about[0].data;