mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-25 20:48:27 +00:00
add anchor links
This commit is contained in:
parent
c02976782b
commit
98db3d37ef
@ -12,7 +12,7 @@ const { Content } = await post.render();
|
|||||||
>
|
>
|
||||||
<div class="pb-2">
|
<div class="pb-2">
|
||||||
<div class="md:flex justify-between">
|
<div class="md:flex justify-between">
|
||||||
<h1 class="mb-4">{post.title}</h1>
|
<h1 class="mb-4" id={post.slug}>{post.title}</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@ -36,7 +36,13 @@ const posts = (await getCollection('blog')).sort((a, b) => compareDesc(a.data.da
|
|||||||
{posts.map((post) => <BlogPost post={post} />)}
|
{posts.map((post) => <BlogPost post={post} />)}
|
||||||
</PageContent>
|
</PageContent>
|
||||||
<aside class="fixed right-0 h-full overflow-auto pr-4 pl-0 pb-16 hidden xl:block" title="Table of Contents">
|
<aside class="fixed right-0 h-full overflow-auto pr-4 pl-0 pb-16 hidden xl:block" title="Table of Contents">
|
||||||
<RightSidebar headings={[]} />
|
<RightSidebar
|
||||||
|
headings={posts.map((post) => ({
|
||||||
|
depth: 1,
|
||||||
|
slug: post.slug,
|
||||||
|
text: post.data.title,
|
||||||
|
}))}
|
||||||
|
/>
|
||||||
</aside>
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user