--- import type { PostMetadata } from "@/lib/posts"; interface Props extends PostMetadata {} const props = Astro.props; // the list is ordered by date already, so the day and month only add noise const year = props.date.match(/^\d{4}/)?.[0] ?? props.date; --- {props.title} {year}