Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add Waline support #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions en/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ You can set the value of the `enableMath` attribute in the Front Matter of the f

## Comment

Eureka supports using Disqus, Utterances and Commento as comment system。If you need to configure comment, you just need to configure the `comment` in `config/_default/params.yaml`
Eureka supports using Disqus, Utterances, Valine, Waline and Commento as comment system。If you need to configure comment, you just need to configure the `comment` in `config/_default/params.yaml`

Eureka also supports independent configuration of whether to enable comment for each page or section. For example, you have a project with the following file structure:

Expand All @@ -114,7 +114,7 @@ You can set the value of the `enableComment` attribute in the Front Matter of th

**comment.handler(string)**

The optional value is `disqus`, `utterances`, `valine` and `commento`, leave it blank to disable this feature.
The optional value is `disqus`, `utterances`, `valine`, `waline` and `commento`, leave it blank to disable this feature.

**comment.disqus.shortname(string)**

Expand All @@ -130,6 +130,12 @@ Valine related configuration. For specific optional values, please refer to: [Co

Because Hugo's config params are case-insensitive, you need to add `-` or `_` before the uppercase letters. For example, `appId` should be written as `app-Id` or other acceptable formats.

**comment.waline(object)**

Waline related configuration. For specific optional values, please refer to: [Client Options | Waline](https://waline.js.org/en/reference/client.html).Note that you need to add `-` or `_` before the uppercase letters. For example, `pageSize` should be written as `page_Size` or other acceptable formats.

Dark mode follows Eureka on, if you need to customize the style, you can add CSS style in `layouts/partials/comment/waline.html` to override, for more details, please refer to [Custom style | Waline](https://waline.js.org/en/guide/client/style.html).

**comment.commento.url**

If self-hosting, please enter the url (e.g. https://commento.example.com) here. Otherwise leave empty.
Expand Down
10 changes: 8 additions & 2 deletions zh/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ content/

## 评论

Eureka支持使用Disqus,Utterances和Commento作为评论系统。如需配置评论,只需对`config/_default/params.yaml`中的`comment`进行相关配置即可。
Eureka支持使用Disqus,Utterances,Valine,Waline和Commento作为评论系统。如需配置评论,只需对`config/_default/params.yaml`中的`comment`进行相关配置即可。

Eureka也支持对每个界面是否启动评论进行单独配置。例如你有以下文件结构的项目:

Expand All @@ -114,7 +114,7 @@ content/

**comment.handler(string)**

可选值为`disqus`,`utterances`,`valine`及`commento`,留空则不启用该功能。
可选值为`disqus`,`utterances`,`valine`,`waline`及`commento`,留空则不启用该功能。

**comment.disqus.shortname(string)**

Expand All @@ -130,6 +130,12 @@ Valine相关配置。具体可选值可参考:[配置项 | Valine](https://val

因为Hugo的配置文件为大小写不敏感的,因此你需要在大写字母前添加`-`或`_`。例如,`appId`应写作`app-Id`或其他有效形式。

**comment.waline(object)**

Waline相关配置,具体可选项可参考:[前端配置 | Waline](https://waline.js.org/reference/client.html)。注意在大写字母前加`-`或`_`,例如`pageSize`应写作`page_Size`或其他有效形式。

暗黑模式跟随Eureka开启,如果需要自定义样式,可以在`layouts/partials/comment/waline.html`添加CSS覆盖,详细请见[自定义样式 | Waline](https://waline.js.org/guide/client/style.html)。

**comment.commento.url**

如果你的commento为自托管的,该值为你的网址(例如https://commento.example.com)。否则留空。
Expand Down