Backlinks

2 variants. Open one in isolation: use the link on each card.


src/ui/2_organisms/Backlinks.astro
---
import type { BacklinkSource } from '../../lib/internal-links/backlink-graph'
import Heading from '../0_atoms/Heading.astro'
import Link from '../0_atoms/Link.astro'
interface Props {
sources: BacklinkSource[]
}
const { sources } = Astro.props
---
{
sources.length > 0 ? (
<section class="backlinks mt-10 not-prose" aria-label="Posts that link here">
<Heading level="h2" isMeta={true} class="mb-3 text-sm text-ink-faint">Links here</Heading>
<ul class="list-none pl-0 m-0 space-y-2">
{sources.map((s) => (
<li>
<Link href={`/${s.collection}/${s.slug}`} title={s.title} isMeta={true} class="text-sm text-ink-faint" >
{s.title}
</Link>
</li>
))}
</ul>
</section>
) : null
}