minearm-website 0.1.3 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/astro.config.ts +75 -38
- package/minearm.ts +0 -2
- package/package.json +75 -63
- package/public/avatar.avif +0 -0
- package/public/favicon.png +0 -0
- package/public/favicon1.png +0 -0
- package/public/scripts/mdata.json +3 -3
- package/public/scripts/searchData.json +46 -46
- package/src/components/Search.astro +30 -0
- package/src/components/client/searchCore.vue +167 -45
- package/src/components/icons/bilibili.astro +1 -2
- package/src/components/icons/c.astro +1 -2
- package/src/components/icons/cube.astro +1 -3
- package/src/components/icons/hardDriver.astro +1 -2
- package/src/components/icons/home.astro +1 -2
- package/src/components/loading/loading.vue +0 -12
- package/src/components/postlist/pagination.astro +39 -25
- package/src/components/postlist/postsList.astro +57 -0
- package/src/content/blog/history//345/205/254/345/205/203/345/211/215//347/247/246/345/247/213/347/232/207/347/273/237/344/270/200/345/205/255/345/233/275.md +1 -0
- package/src/content/blog/history//350/277/221/344/273/243/347/257/207//344/270/255/345/233/275/345/205/261/344/272/247/345/205/232/345/205/232/345/217/262.md +2360 -2361
- package/src/content/blog/it/Rust/345/237/272/346/234/254/350/257/255/346/263/225.md +14 -0
- package/src/content/config.ts +0 -1
- package/src/layouts/BaseLayout.astro +1 -1
- package/src/layouts/DefaultMdLayout.astro +4 -0
- package/src/layouts/HomeLayout.astro +2 -0
- package/src/layouts/PostLayout.astro +2 -0
- package/src/layouts/TagsLayout.astro +2 -0
- package/src/pages/404.md +2 -0
- package/src/pages/[...page].astro +13 -10
- package/src/pages/about/index.md +3 -3
- package/src/pages/blog/[...slug].astro +10 -1
- package/src/pages/friends/index.md +12 -10
- package/src/styles/blog/code.scss +1 -1
- package/src/styles/components/aside.scss +1 -1
- package/src/styles/components/header.scss +1 -1
- package/src/styles/components/main.scss +1 -1
- package/src/styles/global.scss +2 -2
- package/src/styles/tags/tags.scss +13 -23
- package/src/theme_config.ts +11 -13
- package/tsconfig.json +13 -23
- package/public/13.jpg +0 -0
- package/public/13.png +0 -0
- package/public/1937daxue.png +0 -0
- package/public/3.png +0 -0
- package/public/404.png +0 -0
- package/public/5.jpg +0 -0
- package/public/avatar.jpg +0 -0
- package/public/c++1.png +0 -0
- package/public/logo.png +0 -0
- package/public/nahida.png +0 -0
- package/public/pojipao.avif +0 -0
- package/public/video.png +0 -0
- package/public/xmrig.jpg +0 -0
- package/src/content/blog/Mail.md +0 -15
- package/src/layouts/c.astro +0 -42
- package/src/layouts/h.astro +0 -60
package/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Minearm & Website
|
2
2
|
# 本主题是从[HusBlog](https://github.com/KraHsu/HsuBlog.git)改进而来的
|
3
|
-
最新的正式版是0.1
|
3
|
+
最新的正式版是0.2.1
|
4
4
|
最新的测试版是0.0.3-beta.4
|
5
5
|
|
6
|
-
但是Minearm & Website做出了很大的改变,比如修复了scss警告和升级astro版本到5.
|
6
|
+
但是Minearm & Website做出了很大的改变,比如修复了scss警告和升级astro版本到5.5.4
|
7
7
|
|
8
8
|
# 效果
|
9
9
|

|
package/astro.config.ts
CHANGED
@@ -1,38 +1,75 @@
|
|
1
|
-
import { defineConfig } from "astro/config";
|
2
|
-
import sitemap from "@astrojs/sitemap";
|
3
|
-
import { markdownDirectives, remarkFrontmatter, rehypeFrontmatter, remarkRestyling, rehypeRestyling } from "./src/utils/md";
|
4
|
-
import remarkGfm from "remark-gfm";
|
5
|
-
import remarkMath from "remark-math";
|
6
|
-
import rehypeKatex from "rehype-katex";
|
7
|
-
import rehypeMathjax from "rehype-mathjax";
|
8
|
-
import remarkDirective from "remark-directive";
|
9
|
-
import vue from "@astrojs/vue";
|
10
|
-
import { SiteConfig } from "./src/site_config";
|
11
|
-
import { generateSearchData } from "./src/utils/generateSearchData.ts";
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
1
|
+
import { defineConfig } from "astro/config";
|
2
|
+
import sitemap from "@astrojs/sitemap";
|
3
|
+
import { markdownDirectives, remarkFrontmatter, rehypeFrontmatter, remarkRestyling, rehypeRestyling } from "./src/utils/md";
|
4
|
+
import remarkGfm from "remark-gfm";
|
5
|
+
import remarkMath from "remark-math";
|
6
|
+
import rehypeKatex from "rehype-katex";
|
7
|
+
import rehypeMathjax from "rehype-mathjax";
|
8
|
+
import remarkDirective from "remark-directive";
|
9
|
+
import vue from "@astrojs/vue";
|
10
|
+
import { SiteConfig } from "./src/site_config";
|
11
|
+
import { generateSearchData } from "./src/utils/generateSearchData.ts";
|
12
|
+
import type { Plugin } from "unified";
|
13
|
+
|
14
|
+
// 定义 remark 插件数组类型
|
15
|
+
type RemarkPluginArray = Array<Plugin | false | null | undefined>;
|
16
|
+
// 定义 rehype 插件数组类型
|
17
|
+
type RehypePluginArray = Array<Plugin | false | null | undefined>;
|
18
|
+
|
19
|
+
// 生成 remark 插件数组
|
20
|
+
const generateRemarkPlugins = (): RemarkPluginArray => [
|
21
|
+
remarkFrontmatter,
|
22
|
+
remarkGfm,
|
23
|
+
SiteConfig.markdownMath === true && remarkMath,
|
24
|
+
remarkRestyling,
|
25
|
+
remarkDirective,
|
26
|
+
markdownDirectives,
|
27
|
+
SiteConfig.localSearch && generateSearchData,
|
28
|
+
].filter(Boolean);
|
29
|
+
|
30
|
+
// 生成 rehype 插件数组
|
31
|
+
const generateRehypePlugins = (): RehypePluginArray => [
|
32
|
+
rehypeFrontmatter,
|
33
|
+
rehypeRestyling,
|
34
|
+
SiteConfig.markdownMath === "Katex" && rehypeKatex,
|
35
|
+
SiteConfig.markdownMath === "Mathjax" && rehypeMathjax,
|
36
|
+
].filter(Boolean);
|
37
|
+
|
38
|
+
// 定义 markdown 配置
|
39
|
+
const markdownConfig = {
|
40
|
+
syntaxHighlight: "shiki",
|
41
|
+
shikiConfig: {
|
42
|
+
theme: "css-variables",
|
43
|
+
langs: [],
|
44
|
+
wrap: false,
|
45
|
+
},
|
46
|
+
remarkPlugins: generateRemarkPlugins(),
|
47
|
+
rehypePlugins: generateRehypePlugins(),
|
48
|
+
};
|
49
|
+
|
50
|
+
// 定义 build 配置
|
51
|
+
const buildConfig = {
|
52
|
+
format: "directory",
|
53
|
+
};
|
54
|
+
|
55
|
+
// 定义 collections 配置
|
56
|
+
const collectionsConfig = [
|
57
|
+
{
|
58
|
+
name: "blog",
|
59
|
+
label: "Blog Posts",
|
60
|
+
path: "src/pages/blog",
|
61
|
+
sort: (a, b) => new Date(b.data.date).getTime() - new Date(a.data.date).getTime(),
|
62
|
+
},
|
63
|
+
// ... 其他集合
|
64
|
+
];
|
65
|
+
|
66
|
+
export default defineConfig({
|
67
|
+
site: SiteConfig.site,
|
68
|
+
integrations: [sitemap(), vue()],
|
69
|
+
output: "static",
|
70
|
+
build: buildConfig,
|
71
|
+
collections: collectionsConfig,
|
72
|
+
markdown: markdownConfig,
|
73
|
+
edgeMiddleware: true,
|
74
|
+
});
|
75
|
+
|
package/minearm.ts
CHANGED
@@ -126,9 +126,7 @@ const addAbbrlinkToFile = async (filepath: string) => {
|
|
126
126
|
const pubDateStr = parsedMatter.data.pubDate;
|
127
127
|
const pubDate = new Date(pubDateStr);
|
128
128
|
const abbrlink = pubDate.getTime().toString(36);
|
129
|
-
|
130
129
|
parsedMatter.data.abbrlink = abbrlink;
|
131
|
-
|
132
130
|
const fileContent = matter.stringify(content, parsedMatter.data);
|
133
131
|
await writeFileAsync(filepath, fileContent);
|
134
132
|
console.log(`Permalink added: ${filepath}`);
|
package/package.json
CHANGED
@@ -1,63 +1,75 @@
|
|
1
|
-
{
|
2
|
-
"name": "minearm-website",
|
3
|
-
"description": "Welcome to Minearm & Website.",
|
4
|
-
"version": "0.1
|
5
|
-
"homepage": "https://github.com/Minearm-RPM/minearm",
|
6
|
-
"type": "module",
|
7
|
-
"license": "MIT",
|
8
|
-
"scripts": {
|
9
|
-
"dev": "astro dev",
|
10
|
-
"start": "astro dev",
|
11
|
-
"build": "astro build",
|
12
|
-
"preview": "astro preview",
|
13
|
-
"astro": "astro",
|
14
|
-
"new": "ts-node ./minearm.ts new",
|
15
|
-
"abbr": "ts-node ./minearm.ts abbr",
|
16
|
-
"newpage": "ts-node ./minearm.ts newPage",
|
17
|
-
"help": "ts-node ./minearm.ts help",
|
18
|
-
"pu": "ts-node ./pu.ts"
|
19
|
-
},
|
20
|
-
"dependencies": {
|
21
|
-
"@astrojs/markdown-remark": "^6.
|
22
|
-
"@astrojs/mdx": "^4.
|
23
|
-
"@astrojs/rss": "
|
24
|
-
"@duannx/vue-client-only": "
|
25
|
-
"@fortawesome/fontawesome-svg-core": "
|
26
|
-
"@fortawesome/free-solid-svg-icons": "
|
27
|
-
"@iconify-json/tabler": "
|
28
|
-
"astro": "^5.
|
29
|
-
"astro-i18next": "
|
30
|
-
"astro-icon": "
|
31
|
-
"fuse.js": "
|
32
|
-
"glob": "
|
33
|
-
"
|
34
|
-
"
|
35
|
-
"
|
36
|
-
"
|
37
|
-
"
|
38
|
-
"
|
39
|
-
"
|
40
|
-
"
|
41
|
-
"rehype-
|
42
|
-
"
|
43
|
-
"remark-
|
44
|
-
"remark-
|
45
|
-
"
|
46
|
-
"
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
"@astrojs/
|
51
|
-
"@
|
52
|
-
"
|
53
|
-
"
|
54
|
-
"
|
55
|
-
"
|
56
|
-
|
57
|
-
|
58
|
-
"
|
59
|
-
"
|
60
|
-
|
61
|
-
"
|
62
|
-
|
63
|
-
|
1
|
+
{
|
2
|
+
"name": "minearm-website",
|
3
|
+
"description": "Welcome to Minearm & Website.",
|
4
|
+
"version": "0.2.1",
|
5
|
+
"homepage": "https://github.com/Minearm-RPM/minearm",
|
6
|
+
"type": "module",
|
7
|
+
"license": "MIT",
|
8
|
+
"scripts": {
|
9
|
+
"dev": "astro dev",
|
10
|
+
"start": "astro dev",
|
11
|
+
"build": "astro build",
|
12
|
+
"preview": "astro preview",
|
13
|
+
"astro": "astro",
|
14
|
+
"new": "ts-node ./minearm.ts new",
|
15
|
+
"abbr": "ts-node ./minearm.ts abbr",
|
16
|
+
"newpage": "ts-node ./minearm.ts newPage",
|
17
|
+
"help": "ts-node ./minearm.ts help",
|
18
|
+
"pu": "ts-node ./pu.ts"
|
19
|
+
},
|
20
|
+
"dependencies": {
|
21
|
+
"@astrojs/markdown-remark": "^6.3.1",
|
22
|
+
"@astrojs/mdx": "^4.2.1",
|
23
|
+
"@astrojs/rss": "4.0.11",
|
24
|
+
"@duannx/vue-client-only": "1.0.3",
|
25
|
+
"@fortawesome/fontawesome-svg-core": "6.7.2",
|
26
|
+
"@fortawesome/free-solid-svg-icons": "6.7.2",
|
27
|
+
"@iconify-json/tabler": "1.2.15",
|
28
|
+
"astro": "^5.5.4",
|
29
|
+
"astro-i18next": "1.0.0-beta.21",
|
30
|
+
"astro-icon": "1.1.5",
|
31
|
+
"fuse.js": "7.0.0",
|
32
|
+
"glob": "11.0.1",
|
33
|
+
"gray-matter": "4.0.3",
|
34
|
+
"hastscript": "9.0.0",
|
35
|
+
"html-loader": "5.1.0",
|
36
|
+
"markdown-loader": "8.0.0",
|
37
|
+
"marked": "15.0.6",
|
38
|
+
"mdast-util-to-string": "4.0.0",
|
39
|
+
"pnpm": "10.3.0",
|
40
|
+
"reading-time": "1.5.0",
|
41
|
+
"rehype-katex": "7.0.1",
|
42
|
+
"rehype-mathjax": "6.0.0",
|
43
|
+
"remark-directive": "3.0.1",
|
44
|
+
"remark-gfm": "4.0.0",
|
45
|
+
"remark-math": "6.0.0",
|
46
|
+
"showdown": "2.1.0",
|
47
|
+
"yargs": "17.7.2"
|
48
|
+
},
|
49
|
+
"devDependencies": {
|
50
|
+
"@astrojs/sitemap": "3.2.1",
|
51
|
+
"@astrojs/vue": "5.0.6",
|
52
|
+
"@types/yargs": "17.0.33",
|
53
|
+
"@waline/api": "^1.0.0",
|
54
|
+
"@waline/client": "^3.5.6",
|
55
|
+
"recaptcha-v3": "^1.11.3",
|
56
|
+
"sass": "1.70.0",
|
57
|
+
"scss": "0.2.4",
|
58
|
+
"ts-node": "10.9.2",
|
59
|
+
"vue": "^3.5.13"
|
60
|
+
},
|
61
|
+
"keywords": [
|
62
|
+
"astro-component",
|
63
|
+
"withastro"
|
64
|
+
],
|
65
|
+
"main": "index.js",
|
66
|
+
"author": "",
|
67
|
+
"pnpm": {
|
68
|
+
"ignoredBuiltDependencies": [
|
69
|
+
"esbuild",
|
70
|
+
"esbuild",
|
71
|
+
"sharp",
|
72
|
+
"sharp"
|
73
|
+
]
|
74
|
+
}
|
75
|
+
}
|
package/public/avatar.avif
CHANGED
Binary file
|
package/public/favicon.png
CHANGED
Binary file
|
Binary file
|
@@ -1,4 +1,4 @@
|
|
1
|
-
{
|
2
|
-
"totalWordCounts":
|
3
|
-
"totalPostCounts":
|
1
|
+
{
|
2
|
+
"totalWordCounts": 117580,
|
3
|
+
"totalPostCounts": 12
|
4
4
|
}
|