tags pages added

This commit is contained in:
Al Murad Uzzaman
2024-05-17 18:25:14 +06:00
parent c137b8afcd
commit 5c03211dfe
17 changed files with 229 additions and 144 deletions
+6 -1
View File
@@ -4,6 +4,8 @@ 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";
export function getStaticPaths() {
const paths = supportedLang.map((lang) => ({
@@ -13,7 +15,10 @@ export function getStaticPaths() {
}
const { lang } = Astro.params;
const about = await getListPage("about", lang);
const about: any = await getListPage(
"about" as ContentCollectionKey,
lang as keyof ContentEntryMap,
);
const { Content } = await about[0].render();
const { title, description, meta_title, image } = about[0].data;