refactor: Phase 14 consistency pass — remove duplicate, fix breadcrumbs, header nav, DocForm
CI / typecheck + build (turbo) (push) Canceled after 0s
CI / typecheck + build (turbo) (push) Canceled after 0s
- Delete apps/web/app/docs/page.tsx (superseded by generic [section]/page.tsx) - Homepage: inline folder tree per section card (📁📄), removed Suspense - Doc page breadcrumbs: dynamic path from doc.slug (was hardcoded 'Docs') - Header nav: added Writeups/Research/Notes section links - DocForm: parent folder dropdown populated from existing folders, slug read- only in edit mode, edit mode keeps section disabled, resolved slug shown - create/page.tsx: use extractFoldersForSection from @mcpedia/core (dedup) - Removed unused extractFoldersForSection import from page.tsx
This commit is contained in:
@@ -325,7 +325,7 @@ export default async function DocPage({ params, searchParams }: DocPageProps) {
|
||||
|
||||
return (
|
||||
<article>
|
||||
{/* Breadcrumb */}
|
||||
{/* Breadcrumb — dynamic based on the doc's actual path */}
|
||||
<nav className="flex items-center gap-2 text-xs text-[#62666d] mb-6">
|
||||
<Link
|
||||
href="/"
|
||||
@@ -333,15 +333,32 @@ export default async function DocPage({ params, searchParams }: DocPageProps) {
|
||||
>
|
||||
MCPedia
|
||||
</Link>
|
||||
<span>/</span>
|
||||
<Link
|
||||
href="/docs"
|
||||
className="hover:text-[#d0d6e0] transition-colors"
|
||||
>
|
||||
Docs
|
||||
</Link>
|
||||
<span>/</span>
|
||||
<span className="text-[#8a8f98]">{doc.title}</span>
|
||||
{doc.slug.split("/").map((part, i) => {
|
||||
const crumbPath = doc.slug.split("/").slice(0, i + 1).join("/");
|
||||
const isLast = i === doc.slug.split("/").length - 1;
|
||||
const label = i === 0
|
||||
? SECTION_LABEL[part] || part
|
||||
: part
|
||||
.split(/[-_]/)
|
||||
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
|
||||
.join(" ");
|
||||
return (
|
||||
<>
|
||||
<span>/</span>
|
||||
<Link
|
||||
key={crumbPath}
|
||||
href={`/${crumbPath}`}
|
||||
className={
|
||||
isLast
|
||||
? "text-[#8a8f98]"
|
||||
: "hover:text-[#d0d6e0] transition-colors"
|
||||
}
|
||||
>
|
||||
{label}
|
||||
</Link>
|
||||
</>
|
||||
);
|
||||
})}
|
||||
</nav>
|
||||
|
||||
{/* Header */}
|
||||
|
||||
Reference in New Issue
Block a user