fix: remove body field badge, improve sidebar tree styling, use doc titles in homepage tree
CI / typecheck + build (turbo) (push) Canceled after 0s

- STANDARD_KEYS now includes 'body' to prevent it from rendering as a custom field badge
- Sidebar: tree-style with border-l + ml-2 indentation per level, section separators with border-b, better depth cues
- Homepage buildFolderTree: uses doc.title from DB (not path segments), so _index shows 'CTF Writeups' instead of 'Index'
- Sidebar: _index path segments no longer show leading-space titles (slugToTitle filters empty)
This commit is contained in:
asepharyana
2026-08-21 10:39:01 +07:00
parent 251a6e9b4d
commit 989ee9c464
3 changed files with 69 additions and 47 deletions
+2 -1
View File
@@ -325,7 +325,8 @@ export default async function DocPage({ params, searchParams }: DocPageProps) {
// Any other key in the document metadata becomes a dynamic badge.
const STANDARD_KEYS = new Set([
"id", "slug", "title", "type", "section", "status",
"author", "tags", "path", "createdAt", "updatedAt", "extraFields",
"author", "tags", "path", "createdAt", "updatedAt",
"extraFields", "body",
]);
// Edit mode: inline form