jnordberg / wintersmith

A flexible static site generator
http://wintersmith.io/
MIT License
3.5k stars 335 forks source link

Disqus support? #16

Closed asselinpaul closed 12 years ago

asselinpaul commented 12 years ago

Or any other way to implement comments?

lhagan commented 12 years ago

You should be able to implement Disqus comments simply by adding their code to the end of your articles.jade template, right?

| <div id="disqus_thread"></div>
| <script type="text/javascript">
|    /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
|    var disqus_shortname = 'shortname'; // required: replace example with your forum shortname
|
|    /* * * DON'T EDIT BELOW THIS LINE * * */
|    (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>
| <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
asselinpaul commented 12 years ago

Yeah I guess so, sorry for the trouble.

AlexZeitler commented 10 years ago

@asselinpaul How did you get it working? I tried it as @lhagan suggested but I get errors like "Unexpected token ;" I can remove all ; and add line breaks where neccessary but when it comes to the } I'm stuck.

AlexZeitler commented 10 years ago

Solved it using this sample.