theme-mintfolio-starter 1.0.1 → 1.0.2
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 +56 -56
- package/package.json +3 -3
- package/theme.mjs +1 -1
package/README.md
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
# Mintfolio Theme Starter
|
|
2
|
-
|
|
3
|
-
从两张 Astro 页面开始,写一个自己的 [Mintfolio](https://github.com/cnflwzh/mintfolio) 主题。
|
|
4
|
-
|
|
5
|
-
这个仓库提供首页、文章页、一个布局和少量样式。归档、普通页面与 404 由 Core 补齐,密码文章直接使用 Core 的解锁组件。你可以先调整颜色和排版,再逐个替换页面。
|
|
6
|
-
|
|
7
|
-
## 开始修改
|
|
8
|
-
|
|
9
|
-
点击 GitHub 的 **Use this template**,或者克隆:
|
|
10
|
-
|
|
11
|
-
~~~sh
|
|
12
|
-
git clone https://github.com/cnflwzh/mintfolio-theme-starter.git my-theme
|
|
13
|
-
cd my-theme
|
|
14
|
-
npm ci
|
|
15
|
-
~~~
|
|
16
|
-
|
|
17
|
-
先改这些文件:
|
|
18
|
-
|
|
19
|
-
| 文件 | 修改内容 |
|
|
20
|
-
| --- | --- |
|
|
21
|
-
| package.json | 自己的包名、作者和仓库地址;如设置了 private,发布前移除 |
|
|
22
|
-
| theme.mjs | id、显示名称、版本、页面与设置项 |
|
|
23
|
-
| src/layouts/StarterLayout.astro | 页面框架、SEO 与导航 |
|
|
24
|
-
| src/pages/home.astro | 首页 |
|
|
25
|
-
| src/pages/post.astro | 公开正文与密码文章 |
|
|
26
|
-
| src/styles | 排版与样式 |
|
|
27
|
-
|
|
28
|
-
## 放进站点里看
|
|
29
|
-
|
|
30
|
-
在主题目录运行:
|
|
31
|
-
|
|
32
|
-
~~~sh
|
|
33
|
-
npm run check
|
|
34
|
-
npm pack
|
|
35
|
-
~~~
|
|
36
|
-
|
|
37
|
-
把生成的 tgz 放进已安装 Mintfolio 的测试站点,在站点目录运行:
|
|
38
|
-
|
|
39
|
-
~~~sh
|
|
40
|
-
npm install ./theme-mintfolio-starter-1.0.
|
|
41
|
-
mintfolio theme use theme-mintfolio-starter
|
|
42
|
-
mintfolio dev
|
|
43
|
-
~~~
|
|
44
|
-
|
|
45
|
-
如果已经改过包名,命令也换成新名称。修改主题后重新打包安装,发布新版本时增加版本号。
|
|
46
|
-
|
|
47
|
-
## 写页面时记住
|
|
48
|
-
|
|
49
|
-
页面从 Astro.props 取得 theme 和 page。文章链接使用 post.url,导航使用 theme.urls。公开正文在 page.body.html,密码文章交给 ProtectedArticle 组件。主题不读取 content/blog、site.config.ts 或 astro:content。
|
|
50
|
-
|
|
51
|
-
可声明的页面为 home、post、archive、page、notFound,前两个必需。manifest.engine 的 ^1.0.0 对应主题契约,不是 Core 包版本。
|
|
52
|
-
|
|
53
|
-
[主题开发教程](https://github.com/cnflwzh/mintfolio/wiki/Theme-Development) 按顺序介绍设置、页面、搜索、打包与调试。[API 参考](https://github.com/cnflwzh/mintfolio/blob/main/docs/theme-api.md) 提供完整字段和行为说明。
|
|
54
|
-
|
|
55
|
-
## 许可证
|
|
56
|
-
|
|
1
|
+
# Mintfolio Theme Starter
|
|
2
|
+
|
|
3
|
+
从两张 Astro 页面开始,写一个自己的 [Mintfolio](https://github.com/cnflwzh/mintfolio) 主题。
|
|
4
|
+
|
|
5
|
+
这个仓库提供首页、文章页、一个布局和少量样式。归档、普通页面与 404 由 Core 补齐,密码文章直接使用 Core 的解锁组件。你可以先调整颜色和排版,再逐个替换页面。
|
|
6
|
+
|
|
7
|
+
## 开始修改
|
|
8
|
+
|
|
9
|
+
点击 GitHub 的 **Use this template**,或者克隆:
|
|
10
|
+
|
|
11
|
+
~~~sh
|
|
12
|
+
git clone https://github.com/cnflwzh/mintfolio-theme-starter.git my-theme
|
|
13
|
+
cd my-theme
|
|
14
|
+
npm ci
|
|
15
|
+
~~~
|
|
16
|
+
|
|
17
|
+
先改这些文件:
|
|
18
|
+
|
|
19
|
+
| 文件 | 修改内容 |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| package.json | 自己的包名、作者和仓库地址;如设置了 private,发布前移除 |
|
|
22
|
+
| theme.mjs | id、显示名称、版本、页面与设置项 |
|
|
23
|
+
| src/layouts/StarterLayout.astro | 页面框架、SEO 与导航 |
|
|
24
|
+
| src/pages/home.astro | 首页 |
|
|
25
|
+
| src/pages/post.astro | 公开正文与密码文章 |
|
|
26
|
+
| src/styles | 排版与样式 |
|
|
27
|
+
|
|
28
|
+
## 放进站点里看
|
|
29
|
+
|
|
30
|
+
在主题目录运行:
|
|
31
|
+
|
|
32
|
+
~~~sh
|
|
33
|
+
npm run check
|
|
34
|
+
npm pack
|
|
35
|
+
~~~
|
|
36
|
+
|
|
37
|
+
把生成的 tgz 放进已安装 Mintfolio 的测试站点,在站点目录运行:
|
|
38
|
+
|
|
39
|
+
~~~sh
|
|
40
|
+
npm install ./theme-mintfolio-starter-1.0.2.tgz
|
|
41
|
+
mintfolio theme use theme-mintfolio-starter
|
|
42
|
+
mintfolio dev
|
|
43
|
+
~~~
|
|
44
|
+
|
|
45
|
+
如果已经改过包名,命令也换成新名称。修改主题后重新打包安装,发布新版本时增加版本号。
|
|
46
|
+
|
|
47
|
+
## 写页面时记住
|
|
48
|
+
|
|
49
|
+
页面从 Astro.props 取得 theme 和 page。文章链接使用 post.url,导航使用 theme.urls。公开正文在 page.body.html,密码文章交给 ProtectedArticle 组件。主题不读取 content/blog、site.config.ts 或 astro:content。
|
|
50
|
+
|
|
51
|
+
可声明的页面为 home、post、archive、page、notFound,前两个必需。manifest.engine 的 ^1.0.0 对应主题契约,不是 Core 包版本。
|
|
52
|
+
|
|
53
|
+
[主题开发教程](https://github.com/cnflwzh/mintfolio/wiki/Theme-Development) 按顺序介绍设置、页面、搜索、打包与调试。[API 参考](https://github.com/cnflwzh/mintfolio/blob/main/docs/theme-api.md) 提供完整字段和行为说明。
|
|
54
|
+
|
|
55
|
+
## 许可证
|
|
56
|
+
|
|
57
57
|
[GPL-3.0-only](LICENSE)。保留许可证与来源说明,引入第三方素材时一并记录许可。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "theme-mintfolio-starter",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"theme.mjs",
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"astro": "^7.3.2",
|
|
20
|
-
"@mintfolio/core": "^0.
|
|
20
|
+
"@mintfolio/core": "^0.2.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
24
24
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
25
25
|
"@astrojs/check": "^0.9.10",
|
|
26
|
-
"@mintfolio/core": "^0.
|
|
26
|
+
"@mintfolio/core": "^0.2.0",
|
|
27
27
|
"astro": "^7.3.2",
|
|
28
28
|
"@types/node": "^22.20.2"
|
|
29
29
|
},
|