From 80f0ab31aceec35c9fd04a6387b14349b806f713 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Fri, 4 Jul 2025 19:14:54 +0900
Subject: feat(blog/nuldoc): implement TOC

---
 services/blog/nuldoc-src/pages/PostPage.tsx | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'services/blog/nuldoc-src/pages/PostPage.tsx')

diff --git a/services/blog/nuldoc-src/pages/PostPage.tsx b/services/blog/nuldoc-src/pages/PostPage.tsx
index 97a24048..e625518c 100644
--- a/services/blog/nuldoc-src/pages/PostPage.tsx
+++ b/services/blog/nuldoc-src/pages/PostPage.tsx
@@ -1,6 +1,7 @@
 import GlobalFooter from "../components/GlobalFooter.tsx";
 import GlobalHeader from "../components/GlobalHeader.tsx";
 import PageLayout from "../components/PageLayout.tsx";
+import TableOfContents from "../components/TableOfContents.tsx";
 import { Config, getTagLabel } from "../config.ts";
 import { Element } from "../dom.ts";
 import { Document } from "../djot/document.ts";
@@ -36,6 +37,9 @@ export default function PostPage(
                 </ul>
               )}
             </header>
+            {doc.toc && doc.toc.entries.length > 0 && (
+              <TableOfContents toc={doc.toc} />
+            )}
             <div className="post-content">
               <section id="changelog">
                 <h2>
-- 
cgit v1.2.3-70-g09d2

