Coder Social home page Coder Social logo

disqus's Introduction

Typlog Disqus

使用 Typlog 提供的 Disqus 代理服务。服务器费用 $10/年,暂不接受访问量很大的博客。

使用方法

注册:https://typlog.com/account/signup/disqus

注册后,在博客文章页面插入如下代码:

<div id="disqus_thread"></div>
<script>
  disqus_shortname = 'your-disqus-shortname';
  disqus_page_url = 'http://your-blog-post-url';  // optional
  disqus_page_title = 'your blog post title';  // optional
</script>
<script src="//a.typcdn.com/embed/disqus.js"></script>

上面的 disqus.js 会先试着加载 Disqus,如果不成功,则会加载 Typlog 的代理。

注意事项:

  1. 你需要在 Disqus 的设置里打开 Allow guests to comment
  2. 由于 "Pre-moderation is always enabled for guest comments",匿名用户的评论你需要在 Disqus Admin 里审核

显示评论数

Typlog Disqus 会自动显示文章页面的 Comment Count,你不需要在文章页面里加载 count.js

如果要在首页加载评论数的话,推荐使用异步的方式加载count.js,Typlog 的这个代理不提供此功能:

<script>
var el = document.createElement('script');
el.id = 'dsq-count-scr';
el.src = 'https://' + disqus_shortname + '.disqus.com/count.js';
el.async = true;
document.body.appendChild(el);
</script>

联系

如果遇到 bug 或者问题,请发邮件到 [email protected]

disqus's People

Contributors

lepture avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.