diff --git a/README.md b/README.md index 414ea7a..62bff58 100644 --- a/README.md +++ b/README.md @@ -104,9 +104,13 @@ Many personalization settings in `_config.yml`, such as setting your name and si ### Allowing users to leave comments -If you want to enable comments on your site, Beautiful Jekyll supports the [Disqus](https://disqus.com/) comments plugin. To use it, simply sign up to Disqus and add your Disqus shortname to the `disqus` parameter in the `_config.yml`. +If you want to enable comments on your site, Beautiful Jekyll supports either the [Disqus](https://disqus.com/) comments plugin or [Facebook](https://developers.facebook.com/docs/plugins/comments) comments. -If the `disqus` parameter is 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. +To use Disqus, simply sign up to [Disqus](https://disqus.com/) and add your Disqus shortname to the `disqus` parameter in the `_config.yml` file. + +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`. + +If either `disqus` or `fb_comment_id` parameters 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. ### Adding Google Analytics to track page views diff --git a/_config.yml b/_config.yml index 8b70074..ad3880f 100644 --- a/_config.yml +++ b/_config.yml @@ -118,9 +118,15 @@ url-pretty: "MyWebsite.com" # eg. "deanattali.com/beautiful-jekyll" # uri: "demo.wiki.pro" # opt-out: true -# --- Misc --- # +# --- Comments --- # + # Fill in your Disqus shortname (NOT the userid) if you want to support Disqus comments -#disqus: "" +# disqus: "" + +# To use Facebook Comments, fill in a Facebook App ID +# fb_comment_id: "" + +# --- Misc --- # # Facebook App ID # fb_app_id: "" diff --git a/_includes/fb-comment.html b/_includes/fb-comment.html new file mode 100644 index 0000000..8b47a2b --- /dev/null +++ b/_includes/fb-comment.html @@ -0,0 +1,14 @@ +{%- if site.fb_comment_id -%} +
+
+ +
+ +
+{%- endif -%} diff --git a/_layouts/page.html b/_layouts/page.html index 38286a2..9dff552 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -12,6 +12,7 @@ layout: base
{% include disqus.html %}
+ {% include fb-comment.html %} {% endif %} diff --git a/_layouts/post.html b/_layouts/post.html index 21b0629..fc546b9 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -69,6 +69,7 @@ layout: base
{% include disqus.html %}
+ {% include fb-comment.html %} {% endif %}