feat(ui): add article TOC and interactive VRAM calculator for Wan 2.2
Deploy / build (push) Successful in 22s
Deploy / build (push) Successful in 22s
This commit is contained in:
1 parent
0dae8b0daa
commit
2c10cad52b
4 files changed
+609
-1
No files matched your search
@@ -1,6 +1,7 @@
|
||||
---
|
||||
import BaseLayout from '../../layouts/BaseLayout.astro';
|
||||
import AuthorCard from '../../components/AuthorCard.astro';
|
||||
import TableOfContents from '../../components/TableOfContents.astro';
|
||||
import { getCollection, render } from 'astro:content';
|
||||
import { postLang } from '../../lib/lang';
|
||||
import { countWords, readingMinutes } from '../../lib/reading-time';
|
||||
@@ -16,7 +17,7 @@ export async function getStaticPaths() {
|
||||
}
|
||||
|
||||
const { post } = Astro.props;
|
||||
const { Content } = await render(post);
|
||||
const { Content, headings } = await render(post);
|
||||
|
||||
const lang = postLang(post.slug);
|
||||
|
||||
@@ -119,6 +120,8 @@ const jsonLd = {
|
||||
</figure>
|
||||
)}
|
||||
|
||||
<TableOfContents headings={headings} lang={lang} />
|
||||
|
||||
<Content />
|
||||
|
||||
<AuthorCard />
|
||||
|
||||
Reference in new issue
Block a user