Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added Disqus commenting to blog and docs.

  • Loading branch information...
commit 40c5f27d6208826e57e1dbb43ca3ec7e743ff58d 1 parent aa67709
@brixen brixen authored
View
6 web/_includes/by_line.html
@@ -1,4 +1,8 @@
<div class="by_line">
<p><span class="author">{{ post.author }}</span>
- <span class="date">{{ post.date | date: "%d %B %Y" }}</span></p>
+ <span class="date">{{ post.date | date: "%d %B %Y" }}</span>
+ {% if page.comment_count %}
+ {% include comment_count.html %}
+ {% endif %}
+ </p>
</div>
View
2  web/_includes/comment_count.html
@@ -0,0 +1,2 @@
+ <a href="{{ site.host }}{{ post.url }}#disqus_thread"
+ data-disqus-identifier="{{ page.id }}"></a>
View
13 web/_includes/comments.html
@@ -0,0 +1,13 @@
+<div id="disqus_thread"></div>
+<script type="text/javascript">
+ var disqus_shortname = 'rubinius';
+ var disqus_identifier = '{{ page.url }}';
+ var disqus_url = '{{ site.host }}{{ page.url }}';
+
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script>
+<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
View
11 web/_layouts/blog.html
@@ -6,4 +6,15 @@
{% include blog_header.html %}
{{ content }}
{% include footer.html %}
+
+ <script type="text/javascript">
+ var disqus_shortname = 'rubinius';
+
+ (function () {
+ var s = document.createElement('script'); s.async = true;
+ s.type = 'text/javascript';
+ s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
+ (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
+ }());
+ </script>
</body>
View
4 web/_layouts/doc.html
@@ -30,5 +30,9 @@
{% include doc_nav.html %}
+ <div class="container">
+ {% include comments.html %}
+ </div>
+
{% include footer.html %}
</body>
View
2  web/_layouts/post.html
@@ -10,6 +10,8 @@ <h2 class="post_title">{{ page.title }}</h2>
{% assign post = page %}
{% include by_line.html %}
{{ content }}
+
+ {% include comments.html %}
</div>
{% include footer.html %}
</body>
View
1  web/blog.html
@@ -1,5 +1,6 @@
---
layout: blog
+comment_count: true
---
{% include blog_nav.html %}
<div class="container blog_posts">
View
1  web/blog/posts_index.html
@@ -10,6 +10,7 @@
<a href="{{ post.url }}" title="{{ post.title }}" class="post_title"> {{ post.title }} </a>
<span class="author">{{ post.author }}</span>
<span class="date">{{ post.date | date: "%d %B %Y" }}</span>
+ {% include comment_count.html %}
</li>
{% endfor %}
</ul>
View
5 web/stylesheets/application.css
@@ -414,6 +414,11 @@ a.instruction:hover {
padding-left: 0.25em;
}
+#disqus_thread a:hover {
+ color: #325986;
+ text-decoration: underline;
+}
+
.posts_index {
font-size: 1.2em;
}
Please sign in to comment.
Something went wrong with that request. Please try again.