mirror of
https://github.com/Finb/Bark.git
synced 2025-12-08 21:36:01 +00:00
Compare commits
9 Commits
4ba691ed3f
...
5651c0f329
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5651c0f329 | ||
|
|
a5fd46251e | ||
|
|
e0224ff95e | ||
|
|
bb52ee25f6 | ||
|
|
3d8ce36e89 | ||
|
|
20776ce231 | ||
|
|
aefdd5e985 | ||
|
|
479b313c47 | ||
|
|
7896a82f0b |
27
.github/workflows/deploy-docs.yaml
vendored
Normal file
27
.github/workflows/deploy-docs.yaml
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
name: Deploy Docs to Cloudflare Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'docs/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
deployments: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Deploy to Cloudflare Pages
|
||||
uses: cloudflare/wrangler-action@v3
|
||||
with:
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
command: pages deploy docs --branch=main --project-name=bark-docs
|
||||
@ -23,7 +23,12 @@ class MarkdownProcessor: NotificationContentProcessor {
|
||||
codeBlockTextColor: UIColor.black,
|
||||
quoteColor: UIColor.systemGray
|
||||
)
|
||||
bestAttemptContent.body = MarkdownParser(configuration: config).parse(markdown).string
|
||||
let body = MarkdownParser(configuration: config)
|
||||
.parse(markdown)
|
||||
.string
|
||||
// 将 body 中的多个\n替换为单个\n,避免空行太多内容显示不完整。
|
||||
.replacingOccurrences(of: "\n\n+", with: "\n", options: .regularExpression)
|
||||
bestAttemptContent.body = body
|
||||
return bestAttemptContent
|
||||
}
|
||||
}
|
||||
|
||||
3
docs/en-us/_navbar.md
Normal file
3
docs/en-us/_navbar.md
Normal file
@ -0,0 +1,3 @@
|
||||
* Translations
|
||||
- [:uk: English](/en-us/)
|
||||
- [:cn: 简体中文](/)
|
||||
@ -46,8 +46,8 @@ curl -X "POST" "https://api.day.app/your_key" \
|
||||
```sh
|
||||
curl -X "POST" "https://api.day.app/push" \
|
||||
-H 'Content-Type: application/json; charset=utf-8' \
|
||||
-d $'{
|
||||
"markdown": "Hello **Markdown**",
|
||||
-d '{
|
||||
"markdown": "Hello! \n**Markdown**",
|
||||
"title": "Test Title",
|
||||
"device_key": "your_key"
|
||||
}'
|
||||
@ -61,7 +61,7 @@ List of supported parameters, specific effects can be previewed in the APP.
|
||||
| title | Push title |
|
||||
| subtitle | Push subtitle |
|
||||
| body | Push content |
|
||||
| markdown | Push content in Markdown format. When this is provided, the body field is ignored. |
|
||||
| markdown | Push content with basic Markdown. When this is provided, the body field is ignored. |
|
||||
| device_key | Device key |
|
||||
| device_keys | Key array, used for batch push |
|
||||
| level | Push interruption level.<br>critical: Important alert, will ring even in silent mode <br>active:Default value, the system will immediately light up the screen to display the notification<br>timeSensitive:Time-sensitive notification, can display the notification in focus mode.<br>passive:Only adds the notification to the notification list, will not light up the screen. |
|
||||
|
||||
@ -38,7 +38,7 @@ curl -X "POST" "https://api.day.app/your_key" \
|
||||
"sound": "minuet",
|
||||
"icon": "https://day.app/assets/images/avatar.jpg",
|
||||
"group": "test",
|
||||
"url": "https://mritd.com"
|
||||
"url": "https://bark.day.app"
|
||||
}'
|
||||
```
|
||||
|
||||
@ -46,8 +46,8 @@ curl -X "POST" "https://api.day.app/your_key" \
|
||||
```sh
|
||||
curl -X "POST" "https://api.day.app/push" \
|
||||
-H 'Content-Type: application/json; charset=utf-8' \
|
||||
-d $'{
|
||||
"markdown": "Hello **Markdown**",
|
||||
-d '{
|
||||
"markdown": "Hello! \n**Markdown**",
|
||||
"title": "Test Title",
|
||||
"device_key": "your_key"
|
||||
}'
|
||||
@ -61,7 +61,7 @@ curl -X "POST" "https://api.day.app/push" \
|
||||
| title | 推送标题 |
|
||||
| subtitle | 推送副标题 |
|
||||
| body | 推送内容 |
|
||||
| markdown | 推送内容,markdown格式。传递了此参数将忽略 body 字段, 发送时请注意处理特殊字符。|
|
||||
| markdown | 推送内容,支持基础 Markdown 格式。传递了此参数将忽略 body 字段, 发送时请注意处理特殊字符。|
|
||||
| device_key | 设备key |
|
||||
| device_keys | key 数组,用于批量推送 |
|
||||
| level | 推送中断级别。<br>critical: 重要警告, 在静音模式下也会响铃 <br>active:默认值,系统会立即亮屏显示通知<br>timeSensitive:时效性通知,可在专注状态下显示通知。<br>passive:仅将通知添加到通知列表,不会亮屏提醒。 |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user