网站信息卡
This commit is contained in:
1 parent
3d5eb000f1
commit
2d4eeb362c
9 files changed
+329
-5
No files matched your search
+9
-3
@@ -35,7 +35,7 @@ export const siteConfig = {
|
||||
{ label: '隐私政策', href: '/privacy/' },
|
||||
],
|
||||
poweredBy: [
|
||||
{ label: 'EdgeOne', href: 'https://edgeone.ai/' },
|
||||
{ label: 'Fastly', href: 'https://fastly.com/' },
|
||||
{ label: 'ASTRO', href: 'https://astro.build/' },
|
||||
],
|
||||
},
|
||||
@@ -52,14 +52,19 @@ export const siteConfig = {
|
||||
region: '',
|
||||
script: 'https://cdn.jsdelivr.net/npm/twikoo@1.7.7/dist/twikoo.min.js',
|
||||
},
|
||||
analytics: {
|
||||
umami: {
|
||||
script: 'https://umami.biss.click/script.js',
|
||||
websiteId: '3d97b310-b241-4fc6-bc9c-68e317fc7d42',
|
||||
statsEndpoint: 'https://blogumami.biss.click',
|
||||
},
|
||||
},
|
||||
externalLinks: {
|
||||
waitSeconds: 10,
|
||||
whitelist: [
|
||||
'blog.biss.click',
|
||||
'biss.click',
|
||||
'github.com',
|
||||
'astro.build',
|
||||
'edgeone.ai',
|
||||
'localhost',
|
||||
'127.0.0.1',
|
||||
],
|
||||
@@ -121,6 +126,7 @@ export const publicSiteConfig = {
|
||||
site: siteConfig.site,
|
||||
author: siteConfig.author,
|
||||
comments: siteConfig.comments,
|
||||
analytics: siteConfig.analytics,
|
||||
talks: siteConfig.talks,
|
||||
search: siteConfig.search,
|
||||
externalLinks: siteConfig.externalLinks,
|
||||
|
||||
@@ -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>
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
import type { BlogPost } from '@/lib/posts';
|
||||
import SiteInfoCard from '@/components/SiteInfoCard.astro';
|
||||
import { siteConfig } from '../../site.config.mjs';
|
||||
|
||||
interface Props {
|
||||
@@ -111,6 +112,8 @@ const recentPosts = posts.slice(0, 5);
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<SiteInfoCard posts={posts} />
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
|
||||
Loaded 3 of 9 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user