1
1
# 额外功能
2
2
3
+ ## 扩展的 Markdown 语法
4
+
5
+ 参考 https://shiro.innei.in/#/markdown
6
+
7
+ ** 对于 LinkCard 的解析,某些需要你填写 API Key,以下的键值都是填写在 .env 环境变量中**
8
+
9
+ - GitHub,默认直接用浏览器访问,可能受到 rate limit,可以填写 ` GH_TOKEN ` 以保证 API 可达性。
10
+ - TMDB,必须填写 ` TMDB_API_KEY ` 才可以正确解析 tmdb 的链接。参考 https://post.smzdm.com/p/a5op4w33/ 这里获取 TOKEN
11
+
3
12
## 我的动态
4
13
5
14
Shiro 主题中,有一个可以在顶部显示博主当前正在做的事情的功能,这个功能是通过云函数和 ProcessReporter 软件实现的。
6
15
7
- import { ToGitHub } from ' @components/ToGitHub' ;
16
+ import { ToGitHub } from ' @components/ToGitHub'
8
17
9
18
<ToGitHub repo = " mx-space/ProcessReporterMac" />
10
19
<ToGitHub repo = " TNXG/ProcessReporterWinpy" />
@@ -13,7 +22,7 @@ import { ToGitHub } from '@components/ToGitHub';
13
22
import { Callout , Steps } from ' nextra/components'
14
23
15
24
<Callout type = " info" >
16
- 非常感谢 Innei, timochan, TNXG 的贡献,目前 ProcessReporter 已支持全平台!
25
+ 非常感谢 Innei, timochan, TNXG 的贡献,目前 ProcessReporter 已支持全平台!
17
26
</Callout >
18
27
19
28
<Steps >
@@ -32,6 +41,7 @@ import { Callout, Steps } from 'nextra/components'
32
41
这个密钥将用于验证你的软件是否有权限更新博主的动态,所以请务必设置一个复杂的密钥。
33
42
34
43
** 密钥在后面的步骤中还需要用到,所以请务必记住。**
44
+
35
45
</Callout >
36
46
37
47
上方没有提到的选项都不需要填写,然后在右侧的代码编辑器中填入下面链接中的代码:
@@ -41,7 +51,7 @@ import { Callout, Steps } from 'nextra/components'
41
51
点击保存按钮,云函数就配置完成了。
42
52
43
53
<Callout type = " info" >
44
- 请关注此代码的更新,它可能会随时变化,你需要及时更新它们
54
+ 请关注此代码的更新,它可能会随时变化,你需要及时更新它们
45
55
</Callout >
46
56
47
57
### 配置主题配置
@@ -51,21 +61,21 @@ import { Callout, Steps } from 'nextra/components'
51
61
``` json {14,15,16,17}
52
62
{
53
63
"module" : {
54
- "donate" : {
55
- "enable" : false ,
56
- "link" : " https://afdian.net/@Innei " ,
57
- "qrcode" : [
58
- " https://cdn.jsdelivr.net/gh/Innei/img-bed@master/20191211132347.png " ,
59
- " https://cdn.innei.ren/bed/2023/0424213144.png "
60
- ]
61
- },
62
- "bilibili" : {
63
- "liveId" : 1434499
64
- },
65
- "activity" : {
66
- "enable" : true ,
67
- "endpoint" : " /fn/ps/update"
68
- }
64
+ "donate" : {
65
+ "enable" : false ,
66
+ "link" : " https://afdian.net/@Innei" ,
67
+ "qrcode" : [
68
+ " https://cdn.jsdelivr.net/gh/Innei/img-bed@master/20191211132347.png" ,
69
+ " https://cdn.innei.ren/bed/2023/0424213144.png"
70
+ ]
71
+ },
72
+ "bilibili" : {
73
+ "liveId" : 1434499
74
+ },
75
+ "activity" : {
76
+ "enable" : true ,
77
+ "endpoint" : " /fn/ps/update"
78
+ }
69
79
}
70
80
}
71
81
```
@@ -79,9 +89,10 @@ import { Callout, Steps } from 'nextra/components'
79
89
<ToGitHub repo = " ttimochan/processforlinux" />
80
90
81
91
由于不同平台有不同的使用方法,不同的软件我们会在下方具体讲述。
92
+
82
93
</Steps >
83
94
84
- ## ProcessReporter ` Mac `
95
+ ### ProcessReporter ` Mac `
85
96
86
97
打开软件后,你会发现你的系统菜单栏中多了一个图标,点击图标,然后点击「设置」,在弹出的窗口中填入你的信息:
87
98
@@ -92,18 +103,18 @@ import { Callout, Steps } from 'nextra/components'
92
103
93
104
接着关闭窗口,再次点击菜单栏中的图标,点击「Enable」即可。如果一切正常,刷新一下你的博客你就可以在博客顶部看到你的动态了。
94
105
95
- ## ProcessReporter ` Windows `
106
+ ### ProcessReporter ` Windows `
96
107
97
108
Windows 版本的使用问题,请前往 [ TNXG/ProcessReporterWinpy] ( https://github.com/TNXG/ProcessReporterWinpy#readme ) 查看。
98
109
99
- ### 使用 GUI 版本
110
+ #### 使用 GUI 版本
100
111
101
112
在 [ Releases] ( https://github.com/TNXG/ProcessReporterWinpy/releases ) 页面下载 ` ProcessReporterWinpy_Launcher.exe `
102
113
,配置好 ` config.yml ` 文件,然后运行 ` ProcessReporterWinpy_Launcher.exe ` 即可。
103
114
104
115
` config.yml ` 配置具体配置项以及说明请参考 [ TNXG/ProcessReporterWinpy] ( https://github.com/TNXG/ProcessReporterWinpy#readme ) 。
105
116
106
- ### 使用预编译的二进制文件
117
+ #### 使用预编译的二进制文件
107
118
108
119
在 [ Releases] ( https://github.com/TNXG/ProcessReporterWinpy/releases ) 页面下载 ` ProcessReporterWinpy.exe ` ,配置好 ` config.yml ` 文件后,在终端运行即可,示例如下
109
120
@@ -113,7 +124,7 @@ processforwinpy.exe --path "运行目录的路径"
113
124
114
125
` config.yml ` 配置具体配置项以及说明请参考 [ TNXG/ProcessReporterWinpy] ( https://github.com/TNXG/ProcessReporterWinpy#readme ) 。
115
126
116
- ### 使用源代码
127
+ #### 使用源代码
117
128
118
129
下载代码后,修改 ` config.yml ` 文件,填入你的信息:
119
130
@@ -123,14 +134,14 @@ processforwinpy.exe --path "运行目录的路径"
123
134
124
135
接着运行程序即可。如果一切正常,刷新一下你的博客你就可以在博客顶部看到你的动态了。
125
136
126
- ## ProcessReporter ` Linux `
137
+ ### ProcessReporter ` Linux `
127
138
128
139
<ToGitHub repo = " ttimochan/processforlinux#readme" />
129
140
130
141
在仓库的 [ Releases] ( https://github.com/ttimochan/processforlinux/releases ) 页面下载对应的二进制包,解压运行即可,具体请参照项目的 README 进行配置运行。
131
142
132
143
安装完成后,新建 ` .env.process ` 文件,填入你的信息:
133
-
144
+
134
145
``` env
135
146
# 你的 key
136
147
API_KEY=your_key
@@ -139,16 +150,59 @@ API_URL={你的API地址}/fn/ps/update
139
150
# 上报时间间隔,单位为秒
140
151
REPORT_TIME=30
141
152
# 是否开启媒体状态上报
142
- MEDIA_ENABLE=true
153
+ MEDIA_ENABLE=true
143
154
# 是否打印日志
144
- LOG_ENABLE=true
155
+ LOG_ENABLE=true
145
156
```
157
+
146
158
然后执行程序即可。如果一切正常,刷新一下你的博客你就可以在博客顶部看到你的动态了。
147
159
148
160
如果有什么疑问,可以去阅读该项目的 [ README] ( https://github.com/ttimochan/processforlinux#readme )
149
161
150
162
<style global jsx >{ `
151
- .nextra-content pre {
152
- max-height: 55vh;
163
+ .nextra-content pre {
164
+ max-height: 55vh;
153
165
}
154
166
` } </style >
167
+
168
+ import { ProTag } from ' @components/Tag'
169
+
170
+ ## 个人状态展示<ProTag />
171
+
172
+ ![ ] ( ./status.png )
173
+
174
+ 设置当前的状态。
175
+
176
+ ### 配置云函数
177
+
178
+ 进入后台,点击左侧菜单栏的「其他 -> 配置与云函数」,然后点击新建按钮,在选项卡中填入以下信息:
179
+
180
+ - 名称:` status `
181
+ - 引用:` shiro `
182
+ - 数据类型:` Function `
183
+ - 请求方式:` ALL `
184
+
185
+ 这个地方还需要设置一个密钥,在 Secret 中填入 ` key ` ,在 Value 中填入你自己的密钥。
186
+
187
+ <Callout type = " warning" >
188
+ 这个密钥将用于验证你的软件是否有权限更新当前状态,所以请务必设置一个复杂的密钥。
189
+
190
+ ** 密钥在后面的步骤中还需要用到,所以请务必记住。**
191
+
192
+ </Callout >
193
+
194
+ 上方没有提到的选项都不需要填写,然后在右侧的代码编辑器中填入下面链接中的代码:
195
+
196
+ <ToGitHub repo = " mx-space/snippets/blob/main/shiro/functions/status.ts" />
197
+
198
+ 点击保存按钮,云函数就配置完成了。
199
+
200
+ <Callout type = " info" >
201
+ 请关注此代码的更新,它可能会随时变化,你需要及时更新它们
202
+ </Callout >
203
+
204
+ ### 设置状态
205
+
206
+ 在主页登录之后,你可以点击此头像的右下方设置状态。
207
+
208
+ APP 集成正在开发中..
0 commit comments