--- // Starlight's footer (edit link, previous and next), who keeps the project // and where to report a problem, the release the packs come from, and the // licence line. The release is read from release.json, written when the // packs were published: the site may be newer than the packs. None of it // is in the search index: "MIT for the tooling" was the excerpt of short // pages, and "bios", "release" and "problem" matched every page. import Default from '@astrojs/starlight/components/Footer.astro'; import release from '../../../release.json'; const REPO = 'https://github.com/Abdess/retrobios'; const MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; // A release tag is its date, vYYYY.MM.DD. const releaseDate = (tag: string): string | undefined => { const match = /^v(\d{4})\.(\d{2})\.(\d{2})$/.exec(tag); return match ? `${Number(match[3])} ${MONTHS[Number(match[2]) - 1]} ${match[1]}` : undefined; }; const tag: string = release.tag; const date = releaseDate(tag); ---