Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Ruby library for the Disqus commenting API and Javascript widgets.
branch: api

This branch is even with norman:api

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
MIT-LICENSE
README.textile
Rakefile
disqus.gemspec
init.rb

README.textile

Disqus Ruby Gem

The Disqus Gem helps you easily integrate the Disqus
commenting system into your website. It works for any site programmed in Ruby,
and has view helpers for Rails and Merb.

Get it

Stable release:

gem install disqus

Bleeding edge:

gem install norman-disqus --source http://gems.github.com

Use it:

Configure it:


  Disqus::defaults[:account] = "my_account"

Show the comment threads on a post page:


  # Loads the commenting system
  disqus_thread
  
  # Or if you're not using Rails/Merb:
  Disqus::Widget::thread
  
  # Sets the inner html to the comment count for any links on the page that
  # have the anchor "disqus_thread". For example, "View Comments" below would
  # be replaced by "1 comment" or "23 comments" etc.
  # <a href="http://my.website/article-permalink#disqus_thread">View Comments</a>
  # <a href="http://my.website/different-permalink#disqus_thread">View Comments</a>
  disqus_comment_counts
  
  # Or if you're not using Rails/Merb:
  Disqus::Widget::comment_counts

Show the combo widget on a post page:


  disqus_combo(:color => "blue", :hide_mods => false, :num_items => 25)
  
  # Or for non-Rails/Merb:
  Disqus::Widget::combo(:color => "blue", :hide_mods => false, :num_items => 25)

Show the comment count on a permalink:


  link_to("Permalink", post_path(@post, :anchor => "disqus_thread"))
  ...
  disqus_comment_counts
  
  # Or for non-Rails/Merb:
  Disqus::Widget::comment_counts

Hack it:

Github repository: http://github.com/norman/disqus

Complain about it:

norman@randomba.org

Learn more about Disqus:

http://disqus.com

Thanks to the following contributors:

Legal Stuff

The Disqus Ruby gem was not created by, nor is officially supported by
Disqus.com or Big Head Labs, Inc. Use it at your own risk and your own
responsibility under the terms of the MIT License.

Copyright © 2008 Norman Clarke, released under
the MIT license

Something went wrong with that request. Please try again.