Skip to content
23 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

The runner base keeps its old comment, so the pushed base image still matches its folder1/**
2 * The tabs under the header. Each shows its own part of the sidebar: the
3 * groups whose pages fit its `match`. A page belongs to the tab whose
4 * `match` it fits.
5 */
6export type Tab = { label: string; href: string; match: (slug: string) => boolean };
7
8export const TABS: Tab[] = [
9 {
10 label: 'Documentation',
11 href: '/',
12 match: (slug) => !slug.startsWith('reference/'),
13 },
14 {
15 label: 'API reference',
16 href: '/reference/api/',
17 match: (slug) => slug.startsWith('reference/'),
18 },
19];
20
21export function tabFor(slug: string): Tab {
22 return TABS.find((tab) => tab.match(slug)) ?? TABS[0];
23}

This file's history is long; its oldest lines are credited to the oldest commit read.