diff --git a/README.md b/README.md index 61e15e1..a65f72b 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Tale is a minimal Jekyll theme curated for storytellers. Checkout the demo [here - Syntax highlighting, with the help of Pygments - Markdown and HTML text formatting - Pagination of posts -- [Enabling Comments (via Disqus)](#enabling-comments-via-disqus) +- [Disqus comments (can be enabled if needed)](#enabling-comments) ## Installation There are 3 ways to install this theme @@ -113,20 +113,14 @@ $ bundle exec jekyll serve And you're all set! Head over to http://127.0.0.1:4000/ to see your site in action. - -### Enabling Comments (via Disqus) - -Optionally, if you have a Disqus account, you can tell Jekyll to use it to show a comments section below each post. - -To enable it, add the following lines to your Jekyll site: +### Enabling Comments +Comments are disabled by default. To enable them, look for the following line in `_config.yml` and change `jekyll-tale` to your site's Disqus id. ```yml -disqus: your_disqus_id +disqus: jekyll-tale ``` -You can find out more about Disqus' shortnames [here](https://help.disqus.com/installation/whats-a-shortname). - -Comments are disabled by default and will only appear in when adding `comments: true` to that post's YAML Front Matter +Next, add `comments: true` to the YAML front matter of the posts which you would like to enable comments for. ## Contributing Found a bug or have a suggestion? Feel free to create an issue or make a pull request! diff --git a/_config.yml b/_config.yml index fdf2308..7c01e96 100644 --- a/_config.yml +++ b/_config.yml @@ -36,3 +36,6 @@ paginate: 5 # Excludes exclude: [ Gemfile, Gemfile.lock, tale.gemspec ] + +# Disqus (Set to your disqus id) +disqus: jekyll-tale \ No newline at end of file diff --git a/_data/theme.yml b/_data/theme.yml deleted file mode 100644 index 5594052..0000000 --- a/_data/theme.yml +++ /dev/null @@ -1,2 +0,0 @@ -# Disqus -disqus: your_disqus_id \ No newline at end of file diff --git a/_includes/disqus_comment.html b/_includes/disqus_comment.html deleted file mode 100644 index c895db6..0000000 --- a/_includes/disqus_comment.html +++ /dev/null @@ -1,30 +0,0 @@ - - -

Discussion and feedback

-
-
- - - - \ No newline at end of file diff --git a/_includes/disqus_comments.html b/_includes/disqus_comments.html new file mode 100644 index 0000000..4b06c13 --- /dev/null +++ b/_includes/disqus_comments.html @@ -0,0 +1,11 @@ + + +

Discussion and feedback

+
+ + + \ No newline at end of file diff --git a/_layouts/post.html b/_layouts/post.html index ae4eb5e..82d9079 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -21,11 +21,12 @@ layout: default
{{ content }} - + {% if page.comments %} - {% include disqus_comment.html %} + {% include disqus_comments.html %} {% endif %} +