Merge pull request #91 from m1ngsama/main

Fix some bugs and Post a blog
This commit is contained in:
m1ng 2025-06-10 14:15:39 +08:00 committed by GitHub
commit 3e2b34865e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 220 additions and 21 deletions

View file

@ -1,23 +1,26 @@
import { defineConfig } from "astro/config"
import { SITE_URL } from "./src/consts"
import vue from "@astrojs/vue"
import tailwind from "@astrojs/tailwind"
import react from "@astrojs/react"
import { handleLocalCoverPlugin } from "./src/plugins/cover"
import { themePipeline } from "./src/plugins/theme"
import { defineConfig } from "astro/config";
import { SITE_URL } from "./src/consts";
import vue from "@astrojs/vue";
import tailwind from "@astrojs/tailwind";
import react from "@astrojs/react";
import { handleLocalCoverPlugin } from "./src/plugins/cover";
import { themePipeline } from "./src/plugins/theme";
import remarkToc from "remark-toc";
import rehypeSlug from "rehype-slug";
// https://astro.build/config
export default defineConfig({
site: SITE_URL,
markdown: {
rehypePlugins: [handleLocalCoverPlugin, ...themePipeline],
remarkPlugins: [[remarkToc, { heading: "目录", tight: true }]],
rehypePlugins: [rehypeSlug, handleLocalCoverPlugin, ...themePipeline],
syntaxHighlight: "shiki",
shikiConfig: {
themes: {
light: 'github-light',
dark: 'github-dark',
light: "github-light",
dark: "github-dark",
},
}
},
},
integrations: [
vue(),
@ -33,13 +36,13 @@ export default defineConfig({
"/active": {
target: "https://active.nbtca.space",
changeOrigin: true,
rewrite: path => path.replace(/^\/active/, ""),
rewrite: (path) => path.replace(/^\/active/, ""),
},
"/saturday": {
target: "http://localhost:4000",
rewrite: path => path.replace(/^\/saturday/, ""),
rewrite: (path) => path.replace(/^\/saturday/, ""),
},
}
}
}
})
},
},
},
});

View file

@ -38,6 +38,8 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rehype": "^13.0.2",
"rehype-slug": "^6.0.0",
"remark-toc": "^9.0.0",
"sharp": "^0.33.5",
"tailwindcss": "^3.4.17",
"unist-util-visit": "^5.0.0",
@ -49,6 +51,7 @@
"@cspell/eslint-plugin": "^8.19.2",
"@eslint/js": "^9.25.1",
"@hey-api/openapi-ts": "^0.53.12",
"@tailwindcss/typography": "^0.5.16",
"@types/eslint__js": "^8.42.3",
"@types/md5": "^2.3.5",
"@types/qrcode": "^1.5.5",

View file

@ -80,6 +80,12 @@ importers:
rehype:
specifier: ^13.0.2
version: 13.0.2
rehype-slug:
specifier: ^6.0.0
version: 6.0.0
remark-toc:
specifier: ^9.0.0
version: 9.0.0
sharp:
specifier: ^0.33.5
version: 0.33.5
@ -108,6 +114,9 @@ importers:
'@hey-api/openapi-ts':
specifier: ^0.53.12
version: 0.53.12(magicast@0.3.5)(typescript@5.8.3)
'@tailwindcss/typography':
specifier: ^0.5.16
version: 0.5.16(tailwindcss@3.4.17)
'@types/eslint__js':
specifier: ^8.42.3
version: 8.42.3
@ -2371,6 +2380,11 @@ packages:
'@swc/helpers@0.5.17':
resolution: {integrity: sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A==}
'@tailwindcss/typography@0.5.16':
resolution: {integrity: sha512-0wDLwCVF5V3x3b1SGXPCDcdsbDHMBe+lkFzBRaHeLvNi+nrrnZ1lA18u+OTWO8iSWU2GxUOCvlXtDuqftc1oiA==}
peerDependencies:
tailwindcss: '>=3.0.0 || insiders || >=4.0.0-alpha.20 || >=4.0.0-beta.1'
'@tanstack/react-virtual@3.11.3':
resolution: {integrity: sha512-vCU+OTylXN3hdC8RKg68tPlBPjjxtzon7Ys46MgrSLE+JhSjSTPvoQifV6DQJeJmA8Q3KT6CphJbejupx85vFw==}
peerDependencies:
@ -2462,6 +2476,9 @@ packages:
'@types/react@18.3.23':
resolution: {integrity: sha512-/LDXMQh55EzZQ0uVAZmKKhfENivEvWz6E+EYzh+/MCjMhNsotd+ZHhBGIjFDTi6+fz0OhQQQLbTgdQIxxCsC0w==}
'@types/ungap__structured-clone@1.2.0':
resolution: {integrity: sha512-ZoaihZNLeZSxESbk9PUAPZOlSpcKx81I1+4emtULDVmBLkYutTcMlCj2K9VNlf9EWODxdO6gkAqEaLorXwZQVA==}
'@types/unist@3.0.3':
resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==}
@ -3752,6 +3769,9 @@ packages:
hast-util-from-parse5@8.0.3:
resolution: {integrity: sha512-3kxEVkEKt0zvcZ3hCRYI8rqrgwtlIOFMWkbclACvjlDw8Li9S2hk/d51OI0nr/gIpdMHNepwgOKqZ/sy0Clpyg==}
hast-util-heading-rank@3.0.0:
resolution: {integrity: sha512-EJKb8oMUXVHcWZTDepnr+WNbfnXKFNf9duMesmr4S8SXTJBJ9M4Yok08pu9vxdJwdlGRhVumk9mEhkEvKGifwA==}
hast-util-is-element@3.0.0:
resolution: {integrity: sha512-Val9mnv2IWpLbNPqc/pUem+a7Ipj2aHacCwgNfTiK0vJKl0LF+4Ba4+v1oPHFpf3bLYmreq0/l3Gud9S5OH42g==}
@ -3767,6 +3787,9 @@ packages:
hast-util-to-parse5@8.0.0:
resolution: {integrity: sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==}
hast-util-to-string@3.0.1:
resolution: {integrity: sha512-XelQVTDWvqcl3axRfI0xSeoVKzyIFPwsAGSLIsKdJKQMXDYJS4WYrBNF/8J7RdhIcFI2BOHgAifggsvsxp/3+A==}
hast-util-to-text@4.0.2:
resolution: {integrity: sha512-KK6y/BN8lbaq654j7JgBydev7wuNMcID54lkRav1P0CaE1e47P72AWWPiGKXTJU271ooYzcvTAn/Zt0REnvc7A==}
@ -4139,6 +4162,12 @@ packages:
resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==}
engines: {node: '>=10'}
lodash.castarray@4.4.0:
resolution: {integrity: sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==}
lodash.isplainobject@4.0.6:
resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==}
lodash.merge@4.6.2:
resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==}
@ -4222,6 +4251,9 @@ packages:
mdast-util-to-string@4.0.0:
resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==}
mdast-util-toc@7.1.0:
resolution: {integrity: sha512-2TVKotOQzqdY7THOdn2gGzS9d1Sdd66bvxUyw3aNpWfcPXCLYSJCCgfPy30sEtuzkDraJgqF35dzgmz6xlvH/w==}
merge-stream@2.0.0:
resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==}
@ -4680,6 +4712,10 @@ packages:
peerDependencies:
postcss: ^8.2.14
postcss-selector-parser@6.0.10:
resolution: {integrity: sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==}
engines: {node: '>=4'}
postcss-selector-parser@6.1.2:
resolution: {integrity: sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==}
engines: {node: '>=4'}
@ -4799,6 +4835,9 @@ packages:
rehype-raw@7.0.0:
resolution: {integrity: sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==}
rehype-slug@6.0.0:
resolution: {integrity: sha512-lWyvf/jwu+oS5+hL5eClVd3hNdmwM1kAC0BUvEGD19pajQMIzcNUd/k9GsfQ+FfECvX+JE+e9/btsKH0EjJT6A==}
rehype-stringify@10.0.1:
resolution: {integrity: sha512-k9ecfXHmIPuFVI61B9DeLPN0qFHfawM6RsuX48hoqlaKSF61RskNjSm1lI8PhBEM0MRdLxVVm4WmTqJQccH9mA==}
@ -4821,6 +4860,9 @@ packages:
remark-stringify@11.0.0:
resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==}
remark-toc@9.0.0:
resolution: {integrity: sha512-KJ9txbo33GjDAV1baHFze7ij4G8c7SGYoY8Kzsm2gzFpbhL/bSoVpMMzGa3vrNDSWASNd/3ppAqL7cP2zD6JIA==}
repeat-string@1.6.1:
resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==}
engines: {node: '>=0.10'}
@ -8772,6 +8814,14 @@ snapshots:
dependencies:
tslib: 2.8.1
'@tailwindcss/typography@0.5.16(tailwindcss@3.4.17)':
dependencies:
lodash.castarray: 4.4.0
lodash.isplainobject: 4.0.6
lodash.merge: 4.6.2
postcss-selector-parser: 6.0.10
tailwindcss: 3.4.17
'@tanstack/react-virtual@3.11.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
dependencies:
'@tanstack/virtual-core': 3.11.3
@ -8875,6 +8925,8 @@ snapshots:
'@types/prop-types': 15.7.14
csstype: 3.1.3
'@types/ungap__structured-clone@1.2.0': {}
'@types/unist@3.0.3': {}
'@types/uuid@10.0.0': {}
@ -10475,6 +10527,10 @@ snapshots:
vfile-location: 5.0.3
web-namespaces: 2.0.1
hast-util-heading-rank@3.0.0:
dependencies:
'@types/hast': 3.0.4
hast-util-is-element@3.0.0:
dependencies:
'@types/hast': 3.0.4
@ -10523,6 +10579,10 @@ snapshots:
web-namespaces: 2.0.1
zwitch: 2.0.4
hast-util-to-string@3.0.1:
dependencies:
'@types/hast': 3.0.4
hast-util-to-text@4.0.2:
dependencies:
'@types/hast': 3.0.4
@ -10871,6 +10931,10 @@ snapshots:
dependencies:
p-locate: 5.0.0
lodash.castarray@4.4.0: {}
lodash.isplainobject@4.0.6: {}
lodash.merge@4.6.2: {}
log-symbols@6.0.0:
@ -11040,6 +11104,16 @@ snapshots:
dependencies:
'@types/mdast': 4.0.4
mdast-util-toc@7.1.0:
dependencies:
'@types/mdast': 4.0.4
'@types/ungap__structured-clone': 1.2.0
'@ungap/structured-clone': 1.3.0
github-slugger: 2.0.0
mdast-util-to-string: 4.0.0
unist-util-is: 6.0.0
unist-util-visit: 5.0.0
merge-stream@2.0.0: {}
merge2@1.4.1: {}
@ -11582,6 +11656,11 @@ snapshots:
postcss: 8.5.3
postcss-selector-parser: 6.1.2
postcss-selector-parser@6.0.10:
dependencies:
cssesc: 3.0.0
util-deprecate: 1.0.2
postcss-selector-parser@6.1.2:
dependencies:
cssesc: 3.0.0
@ -11718,6 +11797,14 @@ snapshots:
hast-util-raw: 9.1.0
vfile: 6.0.3
rehype-slug@6.0.0:
dependencies:
'@types/hast': 3.0.4
github-slugger: 2.0.0
hast-util-heading-rank: 3.0.0
hast-util-to-string: 3.0.1
unist-util-visit: 5.0.0
rehype-stringify@10.0.1:
dependencies:
'@types/hast': 3.0.4
@ -11772,6 +11859,11 @@ snapshots:
mdast-util-to-markdown: 2.1.2
unified: 11.0.5
remark-toc@9.0.0:
dependencies:
'@types/mdast': 4.0.4
mdast-util-toc: 7.1.0
repeat-string@1.6.1: {}
require-directory@2.1.1: {}

View file

@ -76,7 +76,9 @@ const dateFormatted = formatDate(pubDate)
</div>
</div>
</div>
<slot />
<div class="prose prose-neutral dark:prose-invert max-w-none">
<slot />
</div>
<div class="component">
<div class="component-content">
<div class="article-copyright">
@ -88,7 +90,13 @@ const dateFormatted = formatDate(pubDate)
</a
>
<p class="content">
作者: {frontmatter.author} 发表日期:{dateFormatted}
作者:
{
typeof frontmatter.author === "object"
? <a href={frontmatter.author.url} target="_blank" rel="noopener">{frontmatter.author.name}</a>
: frontmatter.author
}
,发表日期:{dateFormatted}
</p>
</div>
</div>

View file

@ -0,0 +1,88 @@
---
layout: "../../layouts/MarkdownPost.astro"
title: "在Apple Silicon Mac上使用Minecraft光影和模组"
pubDate: 2025-06-10
description: "🤪"
author:
name: "小明"
url: "https://m1ng.space/"
cover:
url: "https://i.pinimg.com/736x/6f/00/d7/6f00d73e426549d0f5b1bb873bf2015f.jpg"
alt: "cover"
tags: ["指南"]
---
# 简介
> 在本指南中我们将向您展示如何使用Iris Shaders模组在Mac上为Minecraft添加光影和模组。这种方法可以增强Mac上Minecraft的视觉效果和游戏体验包括使用Apple Silicon芯片的Mac。我们将介绍安装过程确保您能获得视觉效果出众且运行流畅的Minecraft体验。无论您是刚接触模组和光影还是想要升级您的Minecraft设置这个简明的指南都能满足您的需求。
您需要的所有链接都在这里:
| content | link |
| :------------: | :------------------------------------: |
| Minecraft Java | <https://www.minecraft.net/> |
| Fabric | <https://fabricmc.net/use/installer/> |
| Fabric API | <https://modrinth.com/mod/fabric-api/> |
| Sodium | <https://modrinth.com/mod/sodium> |
| Iris | <https://modrinth.com/mod/iris> |
## 目录
## 1. 安装Fabric
第一步是安装Fabric加载器。前往 <https://fabricmc.net/use/installer/>
并点击Download installer (Universal/.JAR)下载fabric。
双击.jar包安装Fabric加载器。根据您的情况安装特定版本或最新版本。
## 2. 安装必要的模组
安装Fabric加载器后打开Minecraft启动器。您会发现有一个fabri-loader-1.XX.
X只需点击开始游戏下载一些必要的包。
如果一切正确,您就会进入游戏。现在关闭游戏并前往**/Library/Application Support/minecraft**。
您需要创建两个新文件夹一个叫mods在这里放模组和一个叫shaderpacks在这里放光影
现在您需要下载:
- [Fabric API](https://modrinth.com/mod/fabric-api/)
> Fabric API是一个极简的Minecraft模组工具链提供了一个灵活的框架来创建模组。以其快速更新和与新Minecraft版本的兼容性而闻名它支持客户端和服务器端模组使其成为模组社区中的热门选择。
- [Sodium](https://modrinth.com/mod/sodium)
> Sodium是一个Minecraft性能优化模组可以显著提高游戏的帧率并减少延迟。它设计用于与Fabric模组加载器一起工作专注于优化游戏的渲染引擎。通过重写游戏图形引擎的关键部分Sodium提供了更流畅的游戏体验特别是在低端硬件上。它以能够在不影响游戏视觉质量的情况下提升性能而备受好评是希望改善Minecraft体验的玩家的热门选择。
- [Iris](https://modrinth.com/mod/iris)
> Iris是一个用于在Fabric上使用光影的Minecraft模组提供与Sodium的兼容性以增强性能和视觉效果。它简化了光影管理允许高级照明和效果。
> 将下载的文件放入`mods`文件夹。
```bash
➜ mods tree
.
├── fabric-api-0.102.0+1.21.jar
├── iris-fabric-1.8.8+mc1.21.1.jar
├── litematica-fabric-1.21-0.19.58.jar
├── malilib-fabric-1.21-0.21.8.jar
├── reeses-sodium-options-fabric-1.8.3+mc1.21.4.jar
├── sodium-extra-fabric-0.6.0+mc1.21.1.jar
└── sodium-fabric-0.6.13+mc1.21.1.jar
1 directory, 7 files
```
下载这些模组后打开游戏检查是否一切正常。如果有错误可能是因为Mac击支持或版本不兼容。选择正确的版本下载。
## 3. 下载您的光影包
前往 <https://modrinth.com/shaders><https://minecraftshader.com> 下载光影。您需要注意这些光影是否支持Mac。
将下载的光影放入shaderpacks。打开游戏并点击选项>视频设置–>光影包,现在您可以看到您的光影了。
然后在列表中点击您想要的光影包,点击应用,然后完成。
## 4. 享受游戏
恭喜您,尽情享受游戏吧。

View file

@ -1,7 +1,12 @@
import { heroui } from "@heroui/react"
import typography from "@tailwindcss/typography"
/** @type {import('tailwindcss').Config} */
export default {
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}", "./node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}"],
content: [
"./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}",
"./node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}",
],
theme: {
screens: {
xs: "416px",
@ -16,5 +21,5 @@ export default {
},
},
darkMode: ["selector", "body.theme-dark"],
plugins: [heroui()],
plugins: [heroui(), typography()],
}