---
import { getCollection } from "astro:content";
import BaseHead from "../components/BaseHead.astro";
import Header from "../components/Header.astro";
import Footer from "../components/Footer.astro";
import ColorScript from "../components/ColorScript.astro";
import Tags from "../components/Tags.astro";
import getTags from "../scripts/getTags";
const posts = await getCollection("posts");
const allTags = getTags(posts);
let {
content: { title, description, added, updated, tags, heroImage },
} = Astro.props;
added = new Date(added).toLocaleDateString(
"eu",
{
year: "numeric",
month: "short",
day: "numeric",
}
);
if (updated) {
updated = new Date(updated).toLocaleDateString(
"eu",
{
year: "numeric",
month: "short",
day: "numeric",
}
);
}
---