Skip to content

Commit

Permalink
docs: up up
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Apr 8, 2024
1 parent 57a0083 commit 9c76123
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion docs/subscription/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

GKD 的本地规则和远程规则都是订阅, 它们的格式完全一致, 不同之处在于本地订阅用户可以自行更改, 远程规则需要自动更新

订阅使用 [JSON5](https://json5.org/) 语法, 如下便是一个最简单的没有规则的订阅文件的内容
订阅使用 [JSON5](https://json5.org/) 语法, JSON5 是 JSON 的兼容扩展, 它无需键引号, 支持注释

如下便是一个最简单的空规则的订阅文件的内容

```json5
// gkd.json5
{
id: 233,
name: 'Subscription',
Expand All @@ -27,4 +30,31 @@ https://gist.github.com/lisonge/3f5693182ad4ef5e307be760dba22bcb/raw/gkd.json5

上面配置的各项字段的说明注释可在 [API](/api/interfaces/RawSubscription) 查看

## 本地自定义输入 {#local-input}

下面介绍在 GKD 的规则输入框分别能输入什么类型规则

### 应用规则 {#app-rule}

位置: 首页-订阅-本地订阅-应用规则

![image](https://github.com/gkd-kit/gkd/assets/38517192/76d0bc58-de43-416d-9454-f980e8075660){width=50%}

此处可添加 [应用规则](/api/interfaces/RawApp), 如下是一个简单的规则示例, 它由 [快照-13070251](https://i.gkd.li/i/13070251?gkd=VGV4dFZpZXdbaWQ9ImNvbS56aGlodS5hbmRyb2lkOmlkL2J0bl9za2lwIl0) 而来

```json5
{
id: 'com.zhihu.android',
name: '知乎',
groups: [
{
key: 0,
name: '开屏广告',
rules: { matches: 'TextView[id="com.zhihu.android:id/btn_skip"]' },
snapshotUrls: ['https://i.gkd.li/i/13070251'],
},
],
}
```

TODO

0 comments on commit 9c76123

Please sign in to comment.