网站信息卡
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
---
|
||||
import { getCategoryHref, type BlogPost } from '@/lib/posts';
|
||||
import SiteInfoCard from '@/components/SiteInfoCard.astro';
|
||||
import { siteConfig } from '../../site.config.mjs';
|
||||
|
||||
type TocItem = {
|
||||
@@ -17,9 +18,10 @@ interface Props {
|
||||
post: BlogPost;
|
||||
toc: TocItem[];
|
||||
relatedPosts: BlogPost[];
|
||||
posts: BlogPost[];
|
||||
}
|
||||
|
||||
const { post, toc, relatedPosts } = Astro.props;
|
||||
const { post, toc, relatedPosts, posts } = Astro.props;
|
||||
const avatar = siteConfig.author.avatar;
|
||||
const topDepth = toc.length > 0 ? Math.min(...toc.map((item) => item.depth)) : 1;
|
||||
const tocSections = toc.reduce<TocSection[]>((sections, item) => {
|
||||
@@ -107,5 +109,7 @@ const tocSections = toc.reduce<TocSection[]>((sections, item) => {
|
||||
<p class="sidebar-empty">这个分类下暂时没有其他文章。</p>
|
||||
)}
|
||||
</section>
|
||||
|
||||
<SiteInfoCard posts={posts} />
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
Reference in New Issue
Block a user