--- import Layout from "./Layout.astro"; import TOC from "@components/TOC.astro"; import { useTranslatedPath, useTranslations } from "@i18n/utils"; import type { MarkdownLayoutProps } from "astro"; type Props = MarkdownLayoutProps<{ title: string; date: Date; links?: string[][]; toc?: boolean; cover?: string; }>; const { frontmatter, headings } = Astro.props; const t = useTranslations(Astro.url); const { title, url, date: dateString, links, toc, cover } = frontmatter; const collection = url?.split("/")[2]; //@ts-ignore const backlinkContent = t(`nav.${collection}`).toLowerCase(); const date = new Date(dateString); const path = useTranslatedPath(Astro.url); --- {backlinkContent} { links?.length && ( {links.map(([title, url]: string[]) => ( {title} {title === "git" ? ( ) : ( )} ))} ) } { date.toLocaleString("en-US", { month: "long", day: "numeric", year: "numeric", }) } {title} {toc && }