Adds table of contents. Removes now from the top level of the sidebar.

This commit is contained in:
Periodic committed 2026-05-26 17:10:01 -07:00
1 parent 5c90096a10
commit bcc2d85560
7 files changed
+105 -6

No files matched your search

+5 -2
View File
@@ -1,13 +1,15 @@
---
import type { MarkdownHeading } from "astro";
import type { CollectionEntry } from 'astro:content';
import RootLayout from '../layouts/RootLayout.astro';
import FormattedDate from '../components/FormattedDate.astro';
import NotchedBox from '../components/NotchedBox.astro';
import TableOfContents from '../components/TableOfContents.astro';
import { Image } from 'astro:assets';
type Props = CollectionEntry<'blog'>['data'] & { slug: string; };
type Props = CollectionEntry<'blog'>['data'] & { slug: string; headings: MarkdownHeading[] };
const { slug, title, description, pubDate, updatedDate, heroImage, tags } = Astro.props;
const { slug, title, description, pubDate, updatedDate, heroImage, tags, headings } = Astro.props;
---
<style>
@@ -77,6 +79,7 @@ const { slug, title, description, pubDate, updatedDate, heroImage, tags } = Astr
</div>
}
<hr />
<TableOfContents headings={headings} />
<div class="e-content">
<slot />
</div>