Skip to content

Commit e6cc183

Browse files
hugo-ma-alvesdaattali
authored andcommitted
Integration with just-comments (daattali#468)
Add support for just-comments
1 parent 843128c commit e6cc183

File tree

5 files changed

+18
-2
lines changed

5 files changed

+18
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Many personalization settings in `_config.yml`, such as setting your name and si
104104

105105
### Allowing users to leave comments
106106

107-
If you want to enable comments on your site, Beautiful Jekyll supports either the [Disqus](https://disqus.com/) comments plugin, [Facebook](https://developers.facebook.com/docs/plugins/comments) comments or [Staticman](https://staticman.net). If any of these are set in the configuration file, then all blog posts will have comments turned on by default. To turn off comments on a particular blog post, add `comments: false` to the YAML front matter. If you want to add comments on the bottom of a non-blog page, add `comments: true` to the YAML front matter.
107+
If you want to enable comments on your site, Beautiful Jekyll supports either the [Disqus](https://disqus.com/) comments plugin, [Facebook](https://developers.facebook.com/docs/plugins/comments) comments, [Staticman](https://staticman.net) or [just-comments](https://just-comments.com). If any of these are set in the configuration file, then all blog posts will have comments turned on by default. To turn off comments on a particular blog post, add `comments: false` to the YAML front matter. If you want to add comments on the bottom of a non-blog page, add `comments: true` to the YAML front matter.
108108

109109
#### Disqus comments
110110

@@ -118,6 +118,10 @@ To use Facebook comments, create a Facebook app using [Facebook developers](http
118118

119119
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/<username>/<repo-name>`. Lastly, fill in your `repository` and `branch` in the Staticman section of `_config.yml`.
120120

121+
#### Just-Comments comments
122+
123+
To use Just-comments you first need to have an account. After you just need to copy the API key to the just-comments property in `_config.yml` file.
124+
121125
### Adding Google Analytics to track page views
122126

123127
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`.
@@ -147,7 +151,7 @@ title | Page or blog post title
147151
subtitle | Short description of page or blog post that goes under the title
148152
tags | List of tags to categorize the post. Separate the tags with commas and place them inside square brackets. Example: `[personal, self help, finance]`
149153
bigimg | Include a large full-width image at the top of the page. You can either give the path to a single image, or provide a list of images to cycle through (see [my personal website](https://deanattali.com/) as an example).
150-
comments | If you want do add Disqus comments to a specific page, use `comments: true`. Comments are automatically enabled on blog posts; to turn comments off for a specific post, use `comments: false`. Comments only work if you set your Disqus id in the `_config.yml` file.
154+
comments | If you want do add comments to a specific page, use `comments: true`. Comments are automatically enabled on blog posts; to turn comments off for a specific post, use `comments: false`. Comments only work if you enable at least one provider(diqus, staticman, just-comments) in `_config.yml` file.
151155
show-avatar | If you have an avatar configured in the `_config.yml` but you want to turn it off on a specific page, use `show-avatar: false`. If you want to turn it off by default, locate the line `show-avatar: true` in the file `_config.yml` and change the `true` to `false`; then you can selectively turn it on in specific pages using `show-avatar: true`.
152156
image | If you want to add a personalized image to your blog post that will show up next to the post's excerpt and on the post itself, use `image: /path/to/img`.
153157
share-img | If you want to specify an image to use when sharing the page on Facebook or Twitter, then provide the image's full URL here.

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ url-pretty: "MyWebsite.com" # eg. "deanattali.com/beautiful-jekyll"
125125

126126
# Fill in your Disqus shortname (NOT the userid) if you want to support Disqus comments
127127
# disqus: ""
128+
# If you want to use just-comments fill with the API Key
129+
#just-comments: "ABCD-EFGH-IJKL"
128130

129131
# To use Facebook Comments, fill in a Facebook App ID
130132
# fb_comment_id: ""

_includes/just_comments.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{%- if site.just-comments -%}
2+
<div class="just-comments" data-apikey="{{site.just-comments}}"></div>
3+
<script async src="https://just-comments.com/w.js"></script>
4+
{%- endif -%}

_layouts/page.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
{% include fb-comment.html %}
1616
<div class="staticman-comments">
1717
{% include staticman-comments.html %}
18+
</div>
19+
<div class="justcomments-comments">
20+
{% include just_comments.html %}
1821
</div>
1922
{% endif %}
2023
</div>

_layouts/post.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@
7373
<div class="staticman-comments">
7474
{% include staticman-comments.html %}
7575
</div>
76+
<div class="justcomments-comments">
77+
{% include just_comments.html %}
78+
</div>
7679
{% endif %}
7780
</div>
7881
</div>

0 commit comments

Comments
 (0)