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:
@@ -12,10 +12,10 @@ export default async function CreatePage() {
|
||||
if (!canEdit) redirect("/login");
|
||||
|
||||
const allDocs = await listDocuments();
|
||||
|
||||
// Build folder suggestions per section using the shared helper from core
|
||||
const sections = ["docs", "writeups", "research", "notes"];
|
||||
const docPaths = allDocs.map((d) => d.path);
|
||||
|
||||
// Build folder suggestions per section using the shared core helper
|
||||
const sections = ["docs", "writeups", "research", "notes"];
|
||||
const foldersBySection: Record<string, string[]> = {};
|
||||
for (const sec of sections) {
|
||||
foldersBySection[sec] = extractFoldersForSection(docPaths, sec);
|
||||
|
||||
Reference in New Issue
Block a user