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

Comment: set up utterances #40

Open
wants to merge 2 commits 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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ themeStyle: light

### Set up the comment service

The comment box is a place for readers to exchange their ideas with the author. Typography has integrated two 3rd-party comment services, and they are ready to use at any time.
The comment box is a place for readers to exchange their ideas with the author. Typography has integrated three 3rd-party comment services, and they are ready to use at any time.

Currently, Typography supports comment services provided by [Disqus](https://disqus.com/) and [LiveRe](https://livere.com/). The only thing you need to do is to set the corresponding key for the comment service that you would like to use.
Currently, Typography supports comment services provided by [Disqus](https://disqus.com/)/ [LiveRe](https://livere.com/)/[Utterances](https://utteranc.es/). The only thing you need to do is to set the corresponding key for the comment service that you would like to use.

e.g. `disqus: disqus_shortname` OR `livere: livere_data_uid`

Expand Down
2 changes: 1 addition & 1 deletion README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ yarn run build # yarn 用户

评论系统在与读者互动时显得尤为重要,「活版印字」主题也整合了多个第三方评论服务,只需要设置好各平台提供的 ID 便可使用。

目前支持 [Disqus](https://disqus.com/) 以及 [LiveRe](https://livere.com/) 提供的评论服务。
目前支持 [Disqus](https://disqus.com/)[LiveRe](https://livere.com/) 以及 [Utterances](https://utteranc.es/) 提供的评论服务。

例如:`disqus: disqus_shortname` **或** `livere: livere_data_uid`

Expand Down
7 changes: 7 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ livere: # [data-uid] on livere.com
disqus: # [short_name] on disqus.com
dove: # For fun ONLY. Set to true to 'disable' comments on your site.

# Fill ALL of the following to use utterances.
# See utteranc.es for detail.
utterancesRepo: # Choose the repository utterances will connect to.
utterancesIssueTerm: # Choose the mapping between blog posts and GitHub issues.
utterancesLabel: # Choose the label that will be assigned to issues created by Utterances.
utterancesTheme: # Choose an Utterances theme that matches your blog.

# Set true to show the page indicator.
showPageCount: true

Expand Down
2 changes: 1 addition & 1 deletion layout/mixins.jade
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mixin make_post(item, is_detail)
a(href= url_for(item.path))= item.title
p.post-meta
span.date.meta-item!=__("posted_at")+" " + date(item.date, 'YYYY-MM-DD')
if theme.duoshuo || theme.disqus
if theme.duoshuo || theme.disqus || theme.utterancesRepo
span.meta-item
i.fa.fa-comment-o
span  
Expand Down
11 changes: 11 additions & 0 deletions layout/partial/comments.jade
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ if theme.livere
})(document, 'script');
noscript Please activate JavaScript for write a comment in LiveRe

if theme.utterancesRepo
a#comments
script(src="https://utteranc.es/client.js"
repo="#{theme.utterancesRepo}"
issue-term="#{theme.utterancesIssueTerm}"
label="#{theme.utterancesLabel}"
theme="#{theme.utterancesTheme}"
crossorigin="anonymous"
async)
div(class="utterances")

if theme.dove
if theme.dove === true
- var domain = "Null";
Expand Down