Skip to content

Commit

Permalink
doc(plugin/page_vote): add config doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Liumingxun committed Sep 22, 2024
1 parent 6a4e9c0 commit e9c4730
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/docs/en/guide/frontend/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,15 @@ When querying comment counts and page views, Artalk's statistical component uses

To facilitate theme adaptation, you can customize the attribute name as needed, for example, replacing it with `data-path`, the HTML tag would be `<span data-path="/t/1.html"></span>`.

### pageVote

**Page Voting Buttons**

- Type: `Boolean` | `{ voteDown: boolean, btnEl?: string }`
- Default: `true`

Enable / disable page voting feature, set to `falsy` value to disable. `voteDown` sets whether to enable the downvote button (hidden by default). `btnEl` is the selector of the vote button container, defaulting to `".artalk-page-vote"`.

### vote

**Voting Buttons**
Expand Down
9 changes: 9 additions & 0 deletions docs/docs/zh/guide/frontend/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,15 @@ Artalk 统计组件查询评论数和浏览量时,会通过该属性名来查

为了便于主题适配,可根据需要自定义属性名,例如将其替换为 `data-path`,则 HTML 标签为 `<span data-path="/t/1.html"></span>`

### pageVote

**页面投票**

- 类型:`Boolean` | `{ voteDown: boolean, btnEl?: string }`
- 默认值: `true`

启用 / 禁用页面投票功能,设置为 `Falsy` 值则不启用该功能。 `voteDown` 设置是否启用反对投票按钮(默认隐藏), `btnEl` 为投票按钮的容器选择器,默认为 `".artalk-page-vote"`

### vote

**投票按钮**
Expand Down

0 comments on commit e9c4730

Please sign in to comment.