更换到Astro #9
No files matched your search
+9
-3
@@ -35,7 +35,7 @@ export const siteConfig = {
|
|||||||
{ label: '隐私政策', href: '/privacy/' },
|
{ label: '隐私政策', href: '/privacy/' },
|
||||||
],
|
],
|
||||||
poweredBy: [
|
poweredBy: [
|
||||||
{ label: 'EdgeOne', href: 'https://edgeone.ai/' },
|
{ label: 'Fastly', href: 'https://fastly.com/' },
|
||||||
{ label: 'ASTRO', href: 'https://astro.build/' },
|
{ label: 'ASTRO', href: 'https://astro.build/' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -52,14 +52,19 @@ export const siteConfig = {
|
|||||||
region: '',
|
region: '',
|
||||||
script: 'https://cdn.jsdelivr.net/npm/twikoo@1.7.7/dist/twikoo.min.js',
|
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: {
|
externalLinks: {
|
||||||
waitSeconds: 10,
|
waitSeconds: 10,
|
||||||
whitelist: [
|
whitelist: [
|
||||||
'blog.biss.click',
|
'blog.biss.click',
|
||||||
'biss.click',
|
'biss.click',
|
||||||
'github.com',
|
'github.com',
|
||||||
'astro.build',
|
|
||||||
'edgeone.ai',
|
|
||||||
'localhost',
|
'localhost',
|
||||||
'127.0.0.1',
|
'127.0.0.1',
|
||||||
],
|
],
|
||||||
@@ -121,6 +126,7 @@ export const publicSiteConfig = {
|
|||||||
site: siteConfig.site,
|
site: siteConfig.site,
|
||||||
author: siteConfig.author,
|
author: siteConfig.author,
|
||||||
comments: siteConfig.comments,
|
comments: siteConfig.comments,
|
||||||
|
analytics: siteConfig.analytics,
|
||||||
talks: siteConfig.talks,
|
talks: siteConfig.talks,
|
||||||
search: siteConfig.search,
|
search: siteConfig.search,
|
||||||
externalLinks: siteConfig.externalLinks,
|
externalLinks: siteConfig.externalLinks,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
import { getCategoryHref, type BlogPost } from '@/lib/posts';
|
import { getCategoryHref, type BlogPost } from '@/lib/posts';
|
||||||
|
import SiteInfoCard from '@/components/SiteInfoCard.astro';
|
||||||
import { siteConfig } from '../../site.config.mjs';
|
import { siteConfig } from '../../site.config.mjs';
|
||||||
|
|
||||||
type TocItem = {
|
type TocItem = {
|
||||||
@@ -17,9 +18,10 @@ interface Props {
|
|||||||
post: BlogPost;
|
post: BlogPost;
|
||||||
toc: TocItem[];
|
toc: TocItem[];
|
||||||
relatedPosts: BlogPost[];
|
relatedPosts: BlogPost[];
|
||||||
|
posts: BlogPost[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const { post, toc, relatedPosts } = Astro.props;
|
const { post, toc, relatedPosts, posts } = Astro.props;
|
||||||
const avatar = siteConfig.author.avatar;
|
const avatar = siteConfig.author.avatar;
|
||||||
const topDepth = toc.length > 0 ? Math.min(...toc.map((item) => item.depth)) : 1;
|
const topDepth = toc.length > 0 ? Math.min(...toc.map((item) => item.depth)) : 1;
|
||||||
const tocSections = toc.reduce<TocSection[]>((sections, item) => {
|
const tocSections = toc.reduce<TocSection[]>((sections, item) => {
|
||||||
@@ -107,5 +109,7 @@ const tocSections = toc.reduce<TocSection[]>((sections, item) => {
|
|||||||
<p class="sidebar-empty">这个分类下暂时没有其他文章。</p>
|
<p class="sidebar-empty">这个分类下暂时没有其他文章。</p>
|
||||||
)}
|
)}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<SiteInfoCard posts={posts} />
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
import type { BlogPost } from '@/lib/posts';
|
import type { BlogPost } from '@/lib/posts';
|
||||||
|
import SiteInfoCard from '@/components/SiteInfoCard.astro';
|
||||||
import { siteConfig } from '../../site.config.mjs';
|
import { siteConfig } from '../../site.config.mjs';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -111,6 +112,8 @@ const recentPosts = posts.slice(0, 5);
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<SiteInfoCard posts={posts} />
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</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