Skip to content

Commit bd81b86

Browse files
committed
Enabling disqus comments for scala-lang
1 parent 92a82c7 commit bd81b86

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

_includes/disqus.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
<div id="disqus_thread"></div>
3+
<script type="text/javascript">
4+
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
5+
{% if page.language == 'ja' %}
6+
var disqus_shortname = 'scalajp'; // required: replace example with your forum shortname
7+
{% else %}
8+
var disqus_shortname = 'scalasip'; // required: replace example with your forum shortname
9+
{% endif %}
10+
11+
/* * * DON'T EDIT BELOW THIS LINE * * */
12+
(function() {
13+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
14+
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
15+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
16+
})();
17+
</script>
18+
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
19+
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>

_layouts/blog.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,6 @@ <h1 id="page-title">{{ page.title }}</h1>
5050
</div>
5151
</div>
5252

53+
{% if page.disqus == true %}{% include disqus.txt %}{% endif %}
54+
5355
{% include footer.html %}

0 commit comments

Comments
 (0)