Skip to content

Commit 38c848d

Browse files
authored
♻️ refactor: 重构侧栏结构,优化阅读顺序与文本编辑器,杂项修复 (#139)
- 通用知识库拆分至 Java/Bedrock 双上下文 - 优化阅读顺序与文本编辑器章节内容 - 页面最后更新时间去除 git 提交信息 - `content.config.ts` 中 `topic` 从嵌套 `topicSchema.topic` 修正为顶层
1 parent 86e7a35 commit 38c848d

55 files changed

Lines changed: 525 additions & 363 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

astro.config.ts

Lines changed: 134 additions & 133 deletions
Large diffs are not rendered by default.

src/components/LastUpdated.astro

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
---
2-
/*
3-
* Copyright (c) PaperMC
4-
*
5-
* This file includes code derived from the PaperMC project,
6-
* licensed under the BSD 2-Clause License.
7-
*
8-
* Modified by wling
9-
*/
10-
11-
import { Image } from "astro:assets";
12-
import { REPO, getCommitInfo } from "../utils/git";
13-
142
const { lang, lastUpdated } = Astro.locals.starlightRoute;
15-
const filePath = Astro.locals.starlightRoute.entry.filePath;
16-
17-
const info = await getCommitInfo(filePath);
183
---
194

205
{
@@ -29,25 +14,6 @@ const info = await getCommitInfo(filePath);
2914
})}
3015
</time>
3116
</span>
32-
{info && (
33-
<span class="flex items-center gap-1">
34-
{" "}
35-
<a href={info.committer.href} class="flex items-center gap-1 text-accent-high hover:underline">
36-
{info.committer.avatar && (
37-
<Image
38-
src={info.committer.avatar}
39-
alt={info.committer.name}
40-
class="size-4.5 rounded-full"
41-
width="18"
42-
height="18"
43-
loading="lazy"
44-
/>
45-
)}
46-
{info.committer.name}
47-
</a>{" "}
48-
在 <a href={`https://github.com/${REPO}/commit/${info.hash}`} class="text-accent-high hover:underline">{info.hash.substring(0, 7)}</a> 提交
49-
</span>
50-
)}
5117
</p>
5218
)
5319
}

src/content.config.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ export const collections = {
77
docs: defineCollection({
88
loader: docsLoader(),
99
schema: docsSchema({
10-
extend: z.object({
11-
giscus: z.boolean().optional().default(true),
12-
topicSchema: topicSchema.optional()
10+
extend: topicSchema.extend({
11+
giscus: z.boolean().optional().default(true)
1312
})
1413
})
1514
})
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: 经营管理
3+
topic: bedrock
4+
---
5+
6+
import Doc from "../../../general/advance/management/intro.md";
7+
8+
<Doc />
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: 投资心理学
3+
topic: bedrock
4+
---
5+
6+
import Doc from "../../../../general/advance/management/money-management/investment-psychology.md";
7+
8+
<Doc />
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: 资金管理
3+
topic: bedrock
4+
---
5+
6+
import Doc from "../../../../general/advance/management/money-management/money-management.md";
7+
8+
<Doc />
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: 可持续性发展
3+
topic: bedrock
4+
---
5+
6+
import Doc from "../../../../general/advance/management/money-management/sustainable-development.md";
7+
8+
<Doc />
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: 服务器公告
3+
topic: bedrock
4+
---
5+
6+
import Doc from "../../../../general/advance/management/player-management/announcement.md";
7+
8+
<Doc />
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: 进服审核
3+
topic: bedrock
4+
---
5+
6+
import Doc from "../../../../general/advance/management/player-management/auditing.md";
7+
8+
<Doc />
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Chunkbase
3+
topic: bedrock
4+
---
5+
6+
import Doc from "../../../../general/advance/management/player-management/chunkbase.md";
7+
8+
<Doc />

0 commit comments

Comments
 (0)