新增:社区项目区域、中英文社区项目文档 更新:中英文API文档

This commit is contained in:
hhhkkk520 2022-06-10 03:02:57 +02:00
parent 4f24896b15
commit d42c607e65
13 changed files with 118 additions and 11 deletions

View File

@ -23,6 +23,10 @@ export default defineConfig({
link: '/',
activeMatch: '^/$|^/guide/'
},
{ text: '社区项目',
link: '/case/index',
activeMatch: '^/case/'
},
{
text: '开发手册',
link: '/developer/index',
@ -32,6 +36,7 @@ export default defineConfig({
sidebar: {
'/guide/': getGuideSidebarZhCN(),
'/case/': getCaseSidebarZhCN(),
'/developer/': getDeveloperSidebarZhCN(),
'/': getGuideSidebarZhCN()
},
@ -45,12 +50,14 @@ export default defineConfig({
'/en_US/': {
label: 'English',
nav: [
{ text: 'User Guide', link: '/en_US/', activeMatch: '^/$|^/en_US/guide/' },
{ text: 'User Guide', link: '/en_US/', activeMatch: '^/en_US/guide/' },
{ text: 'Community Projects', link: '/en_US/case/index', activeMatch: '^/en_US/case/' },
{ text: 'Development Manual', link: '/en_US/developer/index', activeMatch: '^/en_US/developer/' }
],
sidebar: {
'/en_US/guide/': getGuideSidebarEnUS(),
'/en_US/case/': getCaseSidebarEnUS(),
'/en_US/developer/': getDeveloperSidebarEnUS(),
'/en_US/': getGuideSidebarEnUS()
},
@ -107,6 +114,18 @@ function getGuideSidebarZhCN() {
]
}
function getCaseSidebarZhCN() {
return [
{
text: '社区项目',
children: [
{ text: '搭建哪吒 Telegram 机器人', link: '/case/case1' },
{ text: '使用Siri语音运行快捷指令查询服务器状态', link: '/case/case2' }
]
}
]
}
function getDeveloperSidebarZhCN() {
return [
{
@ -160,6 +179,18 @@ function getGuideSidebarEnUS() {
]
}
function getCaseSidebarEnUS() {
return [
{
text: 'Community Projects',
children: [
{ text: 'Build your own Telegram bot to query server information', link: '/en_US/case/case1' },
{ text: 'Use Siri to run shortcut to check server status', link: '/en_US/case/case2' }
]
}
]
}
function getDeveloperSidebarEnUS() {
return [
{

8
docs/case/case1.md Normal file
View File

@ -0,0 +1,8 @@
# 自建一个TG机器人来查询服务器信息
贡献者:
+ [spiritLHLS](https://github.com/spiritLHLS)
+ [Erope](https://github.com/Erope/)
项目地址:[nezha_api_tgbot](https://github.com/spiritLHLS/nezha_api_tgbot)
机器人可以通过API向面板请求服务器状态信息得到信息后发送给用户
你可以搭建此机器人来方便地查看指定服务器的当前状态且不需要打开面板

21
docs/case/case2.md Normal file
View File

@ -0,0 +1,21 @@
# 在iOS/MacOS中使用Siri运行快捷指令查询服务器状态
当前版本V1.0
贡献者:
+ 白歌 [hhhkkk520](https://github.com/hhhkkk520)
## 获取快捷指令
使用iPhone或iPad扫描以下二维码获取快捷指令
<br/>
![coode](/images/case2/qrcode.png)
<br/>
MacOS用户请访问[这里](https://www.icloud.com/shortcuts/312005bf5ffd4387ac92a84056db9f09),获取快捷指令
## 使用说明
+ 获取快捷指令后,打开并编辑快捷指令
+ 分别在三个文本框中填入 `面板URL``API Token``服务器ID`
+ 保存编辑并测试运行,能获取结果则表示设置正确
+ 修改快捷指令的名称如修改为“一号服务器状态”保存后便可使用Siri指令“嘿Siri一号服务器状态”来获取服务器状态
::: warning
每个快捷指令只能监控一台服务器,如需要监控多个服务器,请多次复制此快捷指令并分别配置,然后分别修改快捷指令名称,如;一号服务器状态、二号服务器状态等
:::

14
docs/case/index.md Normal file
View File

@ -0,0 +1,14 @@
---
home: true
heroImage: https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg
heroText: 哪吒监控社区项目
tagline: 哪吒监控社区贡献的相关项目,为哪吒监控提供了更多扩展
actionText: 查看项目 →
actionLink: /case/case1
features:
- title: 提交项目
details: 我们欢迎您提交自己的项目请加入TG群联系管理员了解相关事宜
- title: 注意事项
details: 所有项目均由社区成员贡献,请您知悉哪吒监控团队无法为社区项目承担包括且不限于:保修、可用性、安全性等责任
---
<br />本作品采用 <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议</a> 进行许可。

8
docs/en_US/case/case1.md Normal file
View File

@ -0,0 +1,8 @@
# Build your own Telegram bot to query server information
Contributors:
+ [spiritLHLS](https://github.com/spiritLHLS)
+ [Erope](https://github.com/Erope/)
Project: [nezha_api_tgbot](https://github.com/spiritLHLS/nezha_api_tgbot) (Chinese)
The bot can request server status information from the Dashboard through the API, and then send the information to the user.
You can build this bot to easily view the current status of a given server without opening the Dashboard.

21
docs/en_US/case/case2.md Normal file
View File

@ -0,0 +1,21 @@
# Use Siri to run shortcut to check server status in iOS/MacOS
Current VersionV1.0 (Chinese)
Contributor:
+ 白歌 [hhhkkk520](https://github.com/hhhkkk520)
## Get shortcut command
Scan the following QR code with your iPhone or iPad to get the shortcut
<br/>
![coode](/images/case2/qrcode.png)
<br/>
MacOS users please visit [here](https://www.icloud.com/shortcuts/312005bf5ffd4387ac92a84056db9f09) to get the shortcut
## How to use
+ After getting the shortcut, open and edit the shortcut
+ Fill in `Dashboard URL`, `API Token`, `Server ID` in the three text boxes
+ Save the edit and test run, if you can get the result, the setting is correct.
+ Modify the name of the shortcut, such as: Server Status, then you can use Siri command: "Hey Siri, Server Status" to get the server status.
::: warning
Each shortcut can only monitor one server, if you need to monitor more than one server, please copy this shortcut several times and configure them separately, then modify the shortcut name separately, such as; Server 1 Status, Server 2 Status, etc.
:::

14
docs/en_US/case/index.md Normal file
View File

@ -0,0 +1,14 @@
---
home: true
heroImage: https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg
heroText: Nezha Monitoring Community Project
tagline: Related projects contributed by Nezha Monitoring community, provide more extensions for Nezha Monitoring
actionText: Learn More →
actionLink: /en_US/case/case1
features:
- title: Submit a project
details: We welcome you to submit your own projects, please join the Telegram group and contact the administrator for more information
- title: Important Notes
details: All projects are contributed by community members. Please be aware that Nezha monitoring team cannot be held responsible for community projects including and not limited to warranty, availability, security, etc.
---
<br/>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.

View File

@ -148,8 +148,3 @@ JSON Return Example:
]
}
```
## Case - Build your own Telegram bot to query server information
Refer to [Community Project](https://github.com/spiritLHLS/nezha_api_tgbot) (Chinese)
The bot can request server status information from the Dashboard through the API, and then send the information to the user.
You can build this bot to easily view the current status of a given server without opening the Dashboard.

View File

@ -148,8 +148,3 @@ JSON返回示例
]
}
```
## 使用案例 - 自建一个TG机器人来查询服务器信息
参考[社区项目](https://github.com/spiritLHLS/nezha_api_tgbot)
机器人可以通过API向面板请求服务器状态信息得到信息后发送给用户
你可以搭建此机器人来方便地查看指定服务器的当前状态且不需要打开面板

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB