--- import type { CollectionEntry } from 'astro:content' import { getConfig } from '@libs/config' import type { Layout } from '@libs/layout' import { getVersionedDocsPath } from '@libs/path' interface Props { addedIn?: CollectionEntry<'docs'>['data']['added'] layout: Layout } const { addedIn, layout } = Astro.props const { slug, version } = Astro.params const isHome = Astro.url.pathname === '/' let versionsLink = '' if (layout === 'docs' && version === getConfig().docs_version) { versionsLink = `${slug}/` } else if (layout === 'single' && Astro.url.pathname.startsWith(getVersionedDocsPath(''))) { versionsLink = Astro.url.pathname.replace(getVersionedDocsPath(''), '') } const addedIn51 = addedIn?.version === '5.1' const addedIn52 = addedIn?.version === '5.2' const addedIn53 = addedIn?.version === '5.3' ---