---
import { en, zh } from "~/config"
import AboutContentEn from "~/config/en/about.mdx"
import AboutContentZh from "~/config/zh/about.mdx"
import { getLangFromUrl } from "~/i18n/utils"
import MainLayout from "~/layouts/main.astro"
import { getLanguagePaths } from "~/utils/langs"

export function getStaticPaths() {
  return getLanguagePaths()
}

const lang = getLangFromUrl(Astro.url)
const pageMeta = lang === "zh" ? zh.pageMeta : en.pageMeta
const AboutContent = lang === "zh" ? AboutContentZh : AboutContentEn
---

<MainLayout
  title={pageMeta.about.title}
  description={pageMeta.about.description}
  ogImage={pageMeta.about.ogImage}
  needComment={true}
>
  <div class="prose max-w-3xl dark:prose-invert">
    <AboutContent />
  </div>
</MainLayout>
