From 90fea1f2f62e68273f143f0ac539b6d376b0bb85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20H=C3=B6lting?= <87192362+moritz-hoelting@users.noreply.github.com> Date: Wed, 18 Mar 2026 14:31:42 +0100 Subject: [PATCH] redesign: add toc to ArticleContent --- src/components/ArticleContent.astro | 96 +++++++++++++++++++++++++++-- src/components/Container.astro | 4 +- 2 files changed, 93 insertions(+), 7 deletions(-) diff --git a/src/components/ArticleContent.astro b/src/components/ArticleContent.astro index 2afc9fa..4c7474b 100644 --- a/src/components/ArticleContent.astro +++ b/src/components/ArticleContent.astro @@ -8,18 +8,72 @@ type Props = { const { entry } = Astro.props; -const { Content } = await render(entry); +const { Content, headings } = await render(entry); --- - -
- -
-
+
+ + + + + +
+ +
+
+
+ + + + diff --git a/src/components/Container.astro b/src/components/Container.astro index b44de3f..89195d3 100644 --- a/src/components/Container.astro +++ b/src/components/Container.astro @@ -3,9 +3,10 @@ import { cn } from "@/lib/utils"; type Props = { size: "sm" | "md" | "lg" | "xl" | "2xl"; + class?: string; }; -const { size } = Astro.props; +const { size, class: className } = Astro.props; ---