V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
imkh
V2EX  ›  程序员

关于 hexo 中多说评论的参数设置

  •  
  •   imkh · 2014-05-18 02:29:42 +08:00 · 6732 次点击
    这是一个创建于 3644 天前的主题,其中的信息可能已经有所发展或是发生改变。
    <!-- 多说评论框 start -->
    <div class="ds-thread" data-thread-key="请将此处替换成文章在你的站点中的ID" data-title="请替换成文章的标题" data-url="请替换成文章的网址"></div>
    <!-- 多说评论框 end -->
    <!-- 多说公共JS代码 start (一个网页只需插入一次) -->
    <script type="text/javascript">
    var duoshuoQuery = {short_name:"maikaiheng"};
    (function() {
    var ds = document.createElement('script');
    ds.type = 'text/javascript';ds.async = true;
    ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
    ds.charset = 'UTF-8';
    (document.getElementsByTagName('head')[0]
    || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
    </script>
    <!-- 多说公共JS代码 end -->

    "请将此处替换成文章在你的站点中的ID"
    "请替换成文章的标题"
    "请替换成文章的网址"

    这里要填什么参数啊?求指教。
    3 条回复    2016-08-28 21:27:43 +08:00
    akfish
        1
    akfish  
       2014-05-18 02:53:36 +08:00
    data-thread-key填成任何能唯一标识post的string就行了,我是用的相对url。
    显示评论数也要用一样的。

    https://gist.github.com/akfish/b4de7181b7fb1e561173
    ccbikai
        2
    ccbikai  
       2014-05-18 09:49:55 +08:00 via Android
    key的优先级高于url
    YIFEIO
        3
    YIFEIO  
       2016-08-28 21:27:43 +08:00
    @akfish 为什么我的在一篇文章中的评论,在其他文章中都可以看到啊
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5822 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 03:39 · PVG 11:39 · LAX 20:39 · JFK 23:39
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.