diff --git a/apps/web/app/[section]/[...slug]/page.tsx b/apps/web/app/[section]/[...slug]/page.tsx index 29eeb52..85a3209 100644 --- a/apps/web/app/[section]/[...slug]/page.tsx +++ b/apps/web/app/[section]/[...slug]/page.tsx @@ -15,6 +15,20 @@ interface DocPageProps { searchParams: Promise<{ edit?: string }>; } +const SECTION_LABEL: Record = { + docs: "Documentation", + writeups: "Writeup", + research: "Research", + notes: "Note", +}; + +const SECTION_ICON: Record = { + docs: "๐Ÿ“„", + writeups: "๐Ÿ“", + research: "๐Ÿ”ฌ", + notes: "๐Ÿ“Œ", +}; + export default async function DocPage({ params, searchParams }: DocPageProps) { const { section, slug } = await params; const { edit } = await searchParams; @@ -60,8 +74,9 @@ export default async function DocPage({ params, searchParams }: DocPageProps) { const revisions = await listRevisions(fullSlug, 10); return ( -
-
+
+ {/* Breadcrumb */} +
+ / + {doc.title} + -

{doc.title}

- -
- {doc.author || "unknown"} - โ€ข - {new Date(doc.updatedAt).toLocaleDateString()} - {doc.tags.map((t) => ( - - #{t} + {/* Header */} +
+
+ {SECTION_ICON[doc.section] || "๐Ÿ“„"} + + {SECTION_LABEL[doc.section] || doc.section} - ))} +
+

+ {doc.title} +

+ +
+ {doc.author || "unknown"} + ยท + + {doc.tags.map((t) => ( + + #{t} + + ))} +
+ {/* Content + TOC */}
+ {/* Related docs (card-style) */} {related.length > 0 && ( -
)} + {/* History */} {revisions.length > 0 && ( -