Skip to content

Added Utterances integration #413

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

Open
wants to merge 3 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
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ If you would like to add a [fade-in-down effect](http://daneden.github.io/animat

See [documentation](http://bryanbraun.github.io/anchorjs/#basic-usage) for more options.

### Utterances
[Utterances](https://utteranc.es/): _A lightweight comments widget built on GitHub issues. Use GitHub issues for blog comments, wiki pages and more!_ You can turn it on by adding a github repository to `utterances_repo`, in the form of `user/repo-name`.

The issue terminology can be customized using key `utterances_issue-term`, the default is `"pathname"`, some of the other options are `"url"` and `"title"`. The full list of options can be found in the official documentation.

The theme can be changed using key `utterances_theme`, the default is `github-light`, the full list as of today is: `github-dark`, `github-dark-orange`, `icy-dark`, `dark-blue`, `photon-dark`. You can also find this list on the official website.

### Put in a Pixyll Plug

If you want to give credit to the Pixyll theme with a link to <http://pixyll.com> or my personal website <http://johnotander.com> somewhere, that'd be awesome. No worries if you don't.
Expand Down
6 changes: 6 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ fb_page_id:
# (leave blank to disable Disqus)
disqus_shortname:

# Utterances github comments (utterances_repo: github_username/repository)
# (leave blank to disable Utterances)
utterances_repo:
utterances_issue-term: pathname
utterances_theme: github-light

# Facebook Comments plugin
# (leave blank to disable Facebook Comments, otherwise set it to true)
facebook_comments:
Expand Down
10 changes: 10 additions & 0 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ <h1>{{ page.title }}</h1>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
{% endif %}

{% if site.utterances_repo %}
<script src="https://utteranc.es/client.js"
repo="{{ site.utterances_repo }}"
issue-term="{{ site.utterances_issue-term }}"
theme="{{ site.utterances_theme }}"
crossorigin="anonymous"
async>
</script>
{% endif %}

{% if site.facebook_comments %}
<div class="fb-comments" data-href="{{ site.url }}{{ page.url }}" data-width="100%" data-numposts="{{ site.facebook_comments_number }}"></div>
{% endif %}
Expand Down