From 8807070dd05f276f3e1687aa5f035ade55f4c8d4 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Mon, 17 Aug 2026 10:38:06 +1000 Subject: [PATCH] fix(website): drop 'In this article' TOC from resource detail pages Resource detail pages (agent, instruction, skill, plugin, extension) are not articles, and their markdown headings do not form a meaningful outline. Playbook and cookbook articles keep their TOC. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 80686fef-efe3-4cdd-8cd6-bfa61a5d0af6 --- website/src/components/brand/AgentDetail.tsx | 9 +-------- website/src/components/brand/ExtensionDetail.tsx | 13 +------------ website/src/components/brand/InstructionDetail.tsx | 9 +-------- website/src/components/brand/PluginDetail.tsx | 13 +------------ website/src/components/brand/SkillDetail.tsx | 10 +--------- website/src/pages/agent/[id].astro | 3 +-- website/src/pages/extension/[id].astro | 3 +-- website/src/pages/instruction/[id].astro | 3 +-- website/src/pages/plugin/[id].astro | 3 +-- website/src/pages/skill/[id].astro | 3 +-- 10 files changed, 10 insertions(+), 59 deletions(-) diff --git a/website/src/components/brand/AgentDetail.tsx b/website/src/components/brand/AgentDetail.tsx index 4a9ea9d4..e93787e6 100644 --- a/website/src/components/brand/AgentDetail.tsx +++ b/website/src/components/brand/AgentDetail.tsx @@ -3,11 +3,7 @@ import React from "react"; import { ActionMenu, Button } from "@primer/react-brand"; -import { - DetailChassis, - type DetailSibling, - type DetailTocItem, -} from "./DetailChassis"; +import { DetailChassis, type DetailSibling } from "./DetailChassis"; import { ResourceMeta } from "./ResourceMeta"; import { pageHref } from "./pageHref"; import type { SearchItem } from "./searchIndex"; @@ -29,7 +25,6 @@ export type AgentDetailProps = { item: AgentDetailItem; /** Rendered, sanitized markdown body with heading ids already stamped. */ markdownHtml: string; - toc: DetailTocItem[]; vscodeUrl: string; insidersUrl: string; githubUrl: string; @@ -45,7 +40,6 @@ export type AgentDetailProps = { export function AgentDetail({ item, markdownHtml, - toc, vscodeUrl, insidersUrl, githubUrl, @@ -138,7 +132,6 @@ export function AgentDetail({ { label: item.title }, ]} install={install} - toc={toc} sidebar={ ) : null; - const fullToc = hasPreview - ? [{ id: PREVIEW_SECTION_ID, label: "Preview" }, ...toc] - : toc; - return ( ); - const chassisToc: DetailTocItem[] = hasContents - ? [{ id: "plugin-contents", label: "What's included" }, ...toc] - : toc; - return ( } - /* Anchors only exist while SKILL.md is on screen. */ - toc={isPrimary ? toc : []} sidebar={ item={item} images={images} markdownHtml={html} - toc={toc} installUrl={appInstallUrl} installCommand={item.external ? null : item.installCommand} sourceUrl={sourceUrl} diff --git a/website/src/pages/instruction/[id].astro b/website/src/pages/instruction/[id].astro index 2b0292af..e32a1d89 100644 --- a/website/src/pages/instruction/[id].astro +++ b/website/src/pages/instruction/[id].astro @@ -40,7 +40,7 @@ const { item, previous, next } = Astro.props as { }; const detail = loadDetailPage(item, "instruction"); -const { html, toc } = buildDetailToc(detail.markdownHtml); +const { html } = buildDetailToc(detail.markdownHtml); const base = import.meta.env.BASE_URL ?? "/"; const prefix = base.endsWith("/") ? base : base + "/"; @@ -61,7 +61,6 @@ const downloadUrl = RAW_BASE + "/" + item.path; client:load item={item as any} markdownHtml={html} - toc={toc} vscodeUrl={detail.vscodeUrl} insidersUrl={detail.insidersUrl} githubUrl={detail.githubUrl} diff --git a/website/src/pages/plugin/[id].astro b/website/src/pages/plugin/[id].astro index f747c8a3..e0207710 100644 --- a/website/src/pages/plugin/[id].astro +++ b/website/src/pages/plugin/[id].astro @@ -61,7 +61,7 @@ const { markdownHtml } = item.readmeFile ? readResourceMarkdown(item.readmeFile) : { markdownHtml: "" }; -const { html, toc } = buildDetailToc(markdownHtml); +const { html } = buildDetailToc(markdownHtml); const githubUrl = item.external ? externalRepoUrl(item.source, [item.repository, item.homepage, GITHUB_TREE]) @@ -90,7 +90,6 @@ const siblingOf = (sibling?: PluginItem) => client:load item={item} markdownHtml={html} - toc={toc} githubUrl={githubUrl} installCommand={installCommand} lastUpdated={lastUpdated} diff --git a/website/src/pages/skill/[id].astro b/website/src/pages/skill/[id].astro index c765bcbb..5eaad4b0 100644 --- a/website/src/pages/skill/[id].astro +++ b/website/src/pages/skill/[id].astro @@ -54,7 +54,7 @@ const { item, previous, next } = Astro.props as { const { markdownHtml, rawMarkdown } = readResourceMarkdown(item.skillFile); const lastUpdated = formatLastUpdated(item.lastUpdated); -const { html, toc } = buildDetailToc(markdownHtml); +const { html } = buildDetailToc(markdownHtml); const githubUrl = `${GITHUB_TREE_BASE}/${item.path}`; const installCommand = `gh skills install ${REPO_IDENTIFIER} ${item.id}`; @@ -72,7 +72,6 @@ const siblingOf = (sibling?: SkillItem) => client:load item={item} markdownHtml={html} - toc={toc} githubUrl={githubUrl} githubBlobBase={GITHUB_BLOB_BASE} rawBase={RAW_BASE}