修改配置文件

This commit is contained in:
biss committed 2026-06-18 21:59:07 +08:00
1 parent fc76f9949f
commit ed2ef30d22
23 files changed
+270 -137

No files matched your search

+4 -3
View File
@@ -1,5 +1,6 @@
---
import { getCategoryHref, type BlogPost } from '@/lib/posts';
import { siteConfig } from '../../site.config.mjs';
type TocItem = {
depth: number;
@@ -19,7 +20,7 @@ interface Props {
}
const { post, toc, relatedPosts } = Astro.props;
const avatar = 'https://free.picui.cn/free/2025/08/10/689845496a283.png';
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) => {
if (item.depth <= topDepth || sections.length === 0) {
@@ -34,8 +35,8 @@ const tocSections = toc.reduce<TocSection[]>((sections, item) => {
<aside class="article-sidebar" aria-label="文章侧边栏">
<section class="sidebar-card article-author-card">
<img class="profile-avatar" src={avatar} alt="biss" loading="lazy" />
<div class="profile-name">biss</div>
<img class="profile-avatar" src={avatar} alt={siteConfig.author.name} loading="lazy" />
<div class="profile-name">{siteConfig.author.name}</div>
<div class="article-author-meta">
<span>{post.dateText}</span>
{post.categories[0] && <a href={getCategoryHref(post.categories[0])}>{post.categories[0]}</a>}
+9 -8
View File
@@ -1,5 +1,6 @@
---
import type { BlogPost } from '@/lib/posts';
import { siteConfig } from '../../site.config.mjs';
interface Props {
posts: BlogPost[];
@@ -8,14 +9,14 @@ interface Props {
}
const { posts, tags, categories } = Astro.props;
const avatar = 'https://free.picui.cn/free/2025/08/10/689845496a283.png';
const avatar = siteConfig.author.avatar;
const recentPosts = posts.slice(0, 5);
---
<aside class="home-sidebar" aria-label="首页侧边栏">
<section class="sidebar-card profile-card">
<img class="profile-avatar" src={avatar} alt="biss" loading="lazy" />
<div class="profile-name">biss</div>
<img class="profile-avatar" src={avatar} alt={siteConfig.author.name} loading="lazy" />
<div class="profile-name">{siteConfig.author.name}</div>
<div class="profile-stats">
<a href="/archives/">
<span>文章</span>
@@ -30,13 +31,13 @@ const recentPosts = posts.slice(0, 5);
<strong>{categories.length}</strong>
</a>
</div>
<a class="follow-button" href="https://github.com/bishshi" target="_blank" rel="noreferrer">
<a class="follow-button" href={siteConfig.author.github} target="_blank" rel="noreferrer">
<span class="github-mark" aria-hidden="true">GitHub</span>
<span>Follow Me</span>
</a>
<div class="profile-links" aria-label="联系方式">
<a href="https://github.com/bishshi" target="_blank" rel="noreferrer" aria-label="GitHub">GitHub</a>
<a href="mailto:bishsh2006@gmail.com" aria-label="Email">Email</a>
<a href={siteConfig.author.github} target="_blank" rel="noreferrer" aria-label="GitHub">GitHub</a>
<a href={`mailto:${siteConfig.author.email}`} aria-label="Email">Email</a>
</div>
</section>
@@ -204,6 +205,6 @@ const recentPosts = posts.slice(0, 5);
initSidebar();
})();
</script>
<script is:inline src="https://code.jquery.com/jquery-4.0.0.min.js"></script>
<script is:inline src="https://cdn.jsdmirror.com/gh/bishshi/welcomemessage/txmap.js"></script>
<script is:inline src={siteConfig.cdn.jqueryJs}></script>
<script is:inline src={siteConfig.cdn.welcomeMessageJs}></script>
<script is:inline src="/js/weather.js"></script>
+3 -1
View File
@@ -1,4 +1,6 @@
---
import { siteConfig } from '../../site.config.mjs';
interface Props {
title: string;
subtitle?: string;
@@ -8,7 +10,7 @@ const { title, subtitle } = Astro.props;
---
<header class="page-header-card">
<p class="page-header-eyebrow">Bi's Blog</p>
<p class="page-header-eyebrow">{siteConfig.site.name}</p>
<h1>{title}</h1>
{subtitle && <p class="page-header-subtitle">{subtitle}</p>}
</header>
Loaded 3 of 23 files, more files were not shown because too many files have changed in this diff. Show more