Dev Helpers

Next.js / Content navigation

Article directory links

Dev Helpers · June 6, 2025

A directory of article links should point to canonical page paths. Stable slugs keep bookmarks working when the visual title changes.

Worked example

// components/ArticleDirectoryLinks.tsx

import Link from "next/link";

export default function ArticleDirectoryLinks({
  items = [
    { slug: "getting-started", title: "Getting started" },
    { slug: "building", title: "Building" },
  ],
}: { items?: { slug: string; title: string }[] } = {}) {
  return (
    <ul>
      {items.map((i) => (
        <li key={i.slug}>
          <Link href={"/articles/" + encodeURIComponent(i.slug)}>{i.title}</Link>
        </li>
      ))}
    </ul>
  );
}

Implementation notes

Internal linking helps both readers and crawlers discover detail pages. Descriptive anchor text gives each destination more context than a row of identical links.

Try it yourself

Open a detail page directly and navigate back through the generated index.

Open the Next.js example →

Editorial date June 6, 2025 · Published December 6, 2026

Related articles

Free bin volume

Free storage volume depends on consistent dimensions and units. Derive capacity and usage in the same unit before formatting a human-readable summary.

Draft preview indexing

Draft pages need deliberate indexing metadata. An indexing directive controls crawler intent, while access to unpublished material needs a separate permission check.

Party size allocation

Allocating a party into groups is an integer problem. The remainder determines whether another group is needed and how full it will be.