--- import * as m from "@/paraglide/messages" import Layout from "@/layouts/Layout.astro" import BadgeList from "@/components/badge/BadgeList.astro" import GiteaLink from "@/components/links/GiteaLink.astro" import { languageTag } from "@/paraglide/runtime" import { getEntry, render } from "astro:content" import { Image } from "astro:assets" import dayjs from "dayjs" import "@/styles/global.css" interface Props { project: string // TODO typeof project slug } const { project } = Astro.props const entry = await getEntry("projects", project) if (!entry) { throw new Error("Project not found") } const { Content } = await render(entry) const { lang, title, description, tags, keywords, heroImage, heroImageAlt, source, createdAt, updatedAt, } = entry.data function localeDateString(isoString: string): string { let template = "DD-MM-YYYY" if (languageTag() === "nb") { template = "DD/MM/YYYY" } return dayjs(isoString).locale(languageTag()).format(template) } ---

{title}

{m.createdAt()}: {localeDateString(createdAt)}

{m.updatedAt()}: {localeDateString(updatedAt)}

{heroImageAlt}

{description}