diff --git a/README.md b/README.md index e199b70..dd5c923 100644 --- a/README.md +++ b/README.md @@ -114,12 +114,17 @@ To use Disqus, simply sign up to [Disqus](https://disqus.com/) and add your Disq To use Facebook comments, create a Facebook app using [Facebook developers](https://developers.facebook.com/docs/apps/register), and add the Facebook App ID to the `fb_comment_id` parameter in `_config.yml`. +#### Utterances comments + +To use [Utterances comments](https://utteranc.es/), follow these steps: (1) Enable Issues in your GitHub repository, (2) Install the Utterances app in your repository (go to https://github.com/apps/utterances), (3) Fill in the `repository` parameter in the utterances section of the `_config.yml` file. + #### Staticman comments To use Staticman, you first need to invite `staticmanlab` as a collaborator to your repository (by going to your repository **Settings** page, navigate to the **Collaborators** tab, and add the username `staticmanlab`), and then accept the invitation by going to `https://staticman3.herokuapp.com/v3/connect/github//`. Lastly, fill in the `staticman` parameters in the Staticman section of `_config.yml`. You may also choose a different Staticman instance other than `staticmanlab`. Optional: You may want to configure a webhook to prevent old inactive branches (representing approved comments) from stacking up. You can refer to [Staticman's documentation](https://staticman.net/docs/webhooks) for details. Make sure to input the **Payload URL** according to your chosen `endpoint`. For example, the default `endpoint` is `https://staticman3.herokuapp.com/v3/entry/github/`, so the corresponding **Payload URL** should be `https://staticman3.herokuapp.com/v1/webhook`. + ### Adding Google Analytics to track page views Beautiful Jekyll lets you easily add Google Analytics to all your pages. This will let you track all sorts of information about visits to your website, such as how many times each page is viewed and where (geographically) your users come from. To add Google Analytics, simply sign up to [Google Analytics](https://www.google.com/analytics/) to obtain your Google Tracking ID, and add this tracking ID to the `google_analytics` parameter in `_config.yml`. diff --git a/_config.yml b/_config.yml index f8c7dd5..98c465d 100644 --- a/_config.yml +++ b/_config.yml @@ -134,6 +134,15 @@ staticman: siteKey : # Use your own site key, you need to apply for one on Google secret : # ENCRYPT your password by going to https://staticman3.herokuapp.com/v3/encrypt/ +# To use Utterances comments: (1) fill in repository (make sure the repository is public), (2) Enable Issues in your repository, (3) Install the Utterances app in your repository https://github.com/apps/utterances +# See more details about the parameters below at https://utteranc.es/ +utterances: + repository: # GitHub username/repository eg. "daattali/beautiful-jekyll" + issue-term: title # Mapping between blog posts and GitHub issues + theme: github-light # Utterances theme + label: blog-comments # Label that will be assigned to GitHub Issues created by Utterances + + # --- Misc --- # # Facebook App ID diff --git a/_includes/utterances-comment.html b/_includes/utterances-comment.html new file mode 100644 index 0000000..ec38e8f --- /dev/null +++ b/_includes/utterances-comment.html @@ -0,0 +1,13 @@ +{% if site.utterances.repo and site.utterances.issue-term %} + + + +{% endif %} + diff --git a/_layouts/page.html b/_layouts/page.html index 44a0d8d..31d9d83 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -16,6 +16,7 @@ layout: base
{% include staticman-comments.html %}
+ {% include utterances-comment.html %} {% endif %} diff --git a/_layouts/post.html b/_layouts/post.html index 3a14ab6..c7bea3e 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -73,6 +73,7 @@ layout: base
{% include staticman-comments.html %}
+ {% include utterances-comment.html %} {% endif %}