Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weekly Merge #286

Merged
merged 15 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/reviewer-lottery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ groups:
- Seayay
- Big-Cake-jpg
- bingxin666
- XieXiLin2
- HRxiaohu
- bingling-sama
4 changes: 2 additions & 2 deletions .github/workflows/pr-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
request:
runs-on: ubuntu-latest
steps:
- name: 🛠️ Checkout
- name: Checkout
uses: actions/checkout@v2

- name: Request Review
- name: Request Review
uses: uesteibar/reviewer-lottery@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
33 changes: 18 additions & 15 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,25 +81,25 @@ const pwaConfig: PwaOptions = {
{
src: "pwa-64x64.png",
sizes: "64x64",
type: "image/png"
type: "image/png",
},
{
src: "pwa-192x192.png",
sizes: "192x192",
type: "image/png"
type: "image/png",
},
{
src: "pwa-512x512.png",
sizes: "512x512",
type: "image/png"
type: "image/png",
},
{
src: "maskable-icon-512x512.png",
sizes: "512x512",
type: "image/png",
purpose: "maskable"
}
]
purpose: "maskable",
},
],
},
workbox: {
globPatterns: ["**/*.{css,js,html,svg,webp,ico,txt,woff2}"],
Expand Down Expand Up @@ -161,6 +161,7 @@ const themeConfig: DefaultTheme.Config = {
nav: [
{ text: "主页", link: "/" },
{ text: "崩溃分析工具", link: "/analyzer" },
{ text: "博客", link: "/blog/" },
{
text: "贡献",
activeMatch: "/contribute/*",
Expand Down Expand Up @@ -318,14 +319,13 @@ export default withPwa(
},
lineNumbers: true,
config: (md) => {
// @ts-expect-error TS2769
md.use(BiDirectionalLinks({
dir: "docs",
baseDir: "/",
}),
md.use(
() => BiDirectionalLinks({
dir: "docs",
baseDir: "/"
})
),
// @ts-expect-error TS2769
md.use(InlineLinkPreviewElementTransform)
md.use(() => InlineLinkPreviewElementTransform)
},
},

Expand All @@ -334,8 +334,11 @@ export default withPwa(
},

head: [
['link', { rel: 'icon', href: '/favicon.ico' }],
['link', { rel: 'apple-touch-icon', href: '/apple-touch-icon-180x180.png' }],
["link", { rel: "icon", href: "/favicon.ico" }],
[
"link",
{ rel: "apple-touch-icon", href: "/apple-touch-icon-180x180.png" },
],
[
"script",
{
Expand Down
6 changes: 3 additions & 3 deletions .vitepress/data/members.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
{
"avatar": "https://cdn.crashmc.com/https://github.com/bingling-sama.png",
"name": "bingling-sama",
"title": "开发者 | 文档贡献者",
"title": "开发者 | 编辑部部长",
"links": [{ "icon": "github", "link": "https://github.com/bingling-sama" }]
},
{
"avatar": "https://cravatar.cn/avatar/8DB351BF50CF41289B1C5C5D726C55D3?s=256",
"name": "神秘人士",
"avatar": "https://cdn.crashmc.com/https://github.com/FalfaChino.png",
"name": "FalfaChino",
"title": "文档格式化"
},
{
Expand Down
23 changes: 23 additions & 0 deletions .vitepress/data/posts.data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { createContentLoader } from "vitepress"

interface Post {
title: string
url: string
date: string
excerpt: string | undefined
}
declare const data: Post[]
export { data }

export default createContentLoader("blog/!(?|index).md", {
// Options
excerpt: true,
transform(raw): Post[] {
return raw.map(({ url, frontmatter, excerpt }) => ({
title: frontmatter.title,
url,
date: frontmatter.date,
excerpt,
}))
},
})
2 changes: 2 additions & 0 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { h } from "vue"
// Components
import LauncherBadge from "./global-components/LauncherBadge.vue"
import ReloadPrompt from "./components/ReloadPrompt.vue"
import Posts from "./layouts/Posts.vue"

// Plugins
import giscusTalk from "vitepress-plugin-comment-with-giscus"
Expand Down Expand Up @@ -56,6 +57,7 @@ export default {
threshold: 300,
})
ctx.app.component("LauncherBadge", LauncherBadge)
ctx.app.component("Posts", Posts)
vitepressNprogress(ctx)
ctx.app.component("vImageViewer", vImageViewer)
ctx.app.use(NolebaseInlineLinkPreviewPlugin)
Expand Down
71 changes: 71 additions & 0 deletions .vitepress/theme/layouts/Posts.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<script lang="ts" setup>
import { data as posts } from "../../data/posts.data"
</script>

<template>
<div class="container">
<div v-for="post in posts" :key="post.url">
<a style="color: inherit;" class="card" :href="post.url">
<span class="title">{{ post.title }}</span>
<div class="content" v-if="post.excerpt" v-html="post.excerpt"></div>
</a>
</div>
</div>
</template>

<style scoped>
.container {
position: relative;
display: flex;
justify-content: center;
align-items: center;
max-width: 1200px;
flex-wrap: wrap;
z-index: 1;
}

.container .card {
position: relative;
width: 15rem;
height: 10rem;
margin: 30px;
box-shadow: 20px 20px 50px rgba(0, 0, 0, 0.5);
border-radius: 15px;
background: rgba(255, 255, 255, 0.1);
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
border-top: 1px solid rgba(255, 255, 255, 0.5);
border-left: 1px solid rgba(255, 255, 255, 0.5);
backdrop-filter: blur(5px);

}

.container .card .title {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
opacity: 1;
transition: opacity 0.3s ease-out;
}

.container .card:hover .title {
opacity: 0;
}

.container .card .content {
padding: 10px;
text-align: center;
transform: translateY(100px);
opacity: 0;
transition: 0.5s;
}

.container .card:hover .content {
transform: translateY(0px) scale(0.8);
opacity: 1;
}

</style>
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@

## 鸣谢

- 神秘人士:提供域名资金支持
- [23355607](https://github.com/2623684696):域名管理
- [龙腾猫跃 / PCL2](https://github.com/Hex-Dragon/PCL2):提供了部分日志分析规则
- 各位志愿者:提供了很多日志分析经验,没有你们河豚分析不会成立
57 changes: 57 additions & 0 deletions docs/blog/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
sidebar: false
---

# 博客板块

本板块包含了 GlobeMC 团队的一些博客文章,有助于提升读者的 Debug 能力,有兴趣的读者可以关注一下。

---

<Posts />

## 关于文章

本博客文章均由 GlobeMC 团队及其成员撰写或约稿,所有内容由其实际具体撰写人负责,仅代表作者观点,如有谬误及不当处望海涵,可以在文章下评论区提出或发送电邮至编辑部部长邮箱<[email protected]>。

有意为 CrashMC Blog 供稿的话也可以电邮联系编辑部部长。

## 贡献提醒

:::warning
所有内容创作者都应仔细阅读本文中的额外排版规范。
:::

欢迎大家参与到 GlobeMC 团队的博客文章的编写中来,博客文章的排版规范以本文档排版规范为准。

有关文章撰写的注意事项如下:

### Frontmatter

Frontmatter 格式如下:

```markdown
---
sidebar: false # 禁用 Sidebar,推荐,可优化阅读体验
title: 文章标题
date: 2024-06-22 19:11:00
---
```

### 文章摘要

出现在第一个 `---` (不包括 Frontmatter)之前的部分为文章摘要,将显示在文章列表卡片中。

### 标题与小标题

一篇文章内应有且仅有一个 Markdown 一级标题 `#` 并其应尽量与 Frontmatter 中 `title` 字段相同。

文章小标题请使用 Markdown 二级标题 `##` 来表示,以便侧边栏目录自动总结。

### 引用资料

所有文章中引用的资料或站外资源都应在文末以特别板块的方式列出。

## 版权声明

本站所有文档及博客内容著作权均归 GlobeMC 及实际文章作者所有,所有内容遵循 [CC BY 4.0 协议](https://creativecommons.org/licenses/by/4.0/),转载请注明出处及原作者。
14 changes: 14 additions & 0 deletions docs/blog/post1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
sidebar: false
title: Post1
date: 2021-01-01T00:00:00Z
---

# Post1

Some text here.
Write excerpts here, before the first `---` line.

---

This is the end of the first post.
12 changes: 12 additions & 0 deletions docs/blog/post2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
sidebar: false
title: A vert lone title to test the display style
date: 2021-01-01 00:00:00
---

# Post 2

some content here

---

4 changes: 4 additions & 0 deletions docs/contribute/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ git clone https://github.com/{yourname}/crashmc.com.git

我们会每周进行一次例行 merge,将所有已完成的更改合并到生产环境 `main` branch,因此请不要将您的更改 PR 到 `main` branch,这会增大我们的代码审查和文档部署工作量。

## 其他提醒

如果要提交博客内容,请参考 [博客主页](https://crashmc.com/blog/) 的贡献指南。

## 鸣谢

感谢所有为 CrashMC 贡献内容的玩家和开发者,你们的支持是对 CrashMC 最大的鼓励。
2 changes: 2 additions & 0 deletions docs/contribute/crash-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ contributors: [bingling-sama]

如果您遇到的问题无法在本文档中找到答案,可以点击[这里](https://github.com/GlobeMC/crashmc.com/issues/new/choose)向我们提交您的错误报告,我们将尽快为您解决问题。同时,您所上传的崩溃日志也将作为改进文档的资料使用,感谢您为本文档提供数据。

如果您遇到的问题已经解决,或您已经找到了可行的解决方案,希望您一并填入 Issue 中,感谢您的贡献。

为了方便我们为您检索问题,在上传 `*.log`/`*.txt` 等文本格式文件时,请优先前往 [MCLogs](https://mclo.gs) 上传文件内容并向我们提供网站生成的链接。

:::info 注意
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ layout: home

hero:
name: "CrashMC"
text: "为一般玩家编写的 Minecraft 崩溃分析指南"
text: "为普通玩家编写的 Minecraft 崩溃分析指南"
tagline: 由一群热心的笨蛋维护
image:
src: /logo-new.webp
Expand Down Expand Up @@ -45,5 +45,5 @@ features:
linkText: 开始使用

title: CrashMC
titleTemplate: 为一般玩家编写的 Minecraft 崩溃分析指南
titleTemplate: 为普通玩家编写的 Minecraft 崩溃分析指南
---
Loading