Coder Social home page Coder Social logo

Comments (8)

xCss avatar xCss commented on June 9, 2024

我不确定是不是你的主题版本号不对,网页源码看起来还像是老版本的代码:

- var GUEST = ['nick','mail','link'];
- var guest = 'nick';
- guest = guest.split(',').filter(item=>{
-    return GUEST.indexOf(item)>-1;
- });
+ // meta some code
+ var meta = ['nick'];
new Valine({
    el: '#comments' ,
    verify: false,
    notify: false,
    appId: 'UsSNtXXXXXXXXXXXXXXXX',
    appKey: 'J83xXXXXXXXXXXXXXX',
    placeholder: '莫西莫西?',
    avatar:'mm',
-    guest_info:guest,
+   meta: meta,
    pageSize: 10,
});

from valine.

Cyclohexatriene avatar Cyclohexatriene commented on June 9, 2024

抱歉,我昨天把博客回滚到老的NexT主题了,现在Deploy的是新版本的NexT了。
刚才又发现一个问题,就是我旧版的NexT的Valine插件显示的版本是V1.5.1的,新版的NexT的Valine插件显示的是V1.4.14的,不知道是不是插件版本的原因?以及我该如何调整使用的插件的版本?感谢您的回复!

from valine.

xCss avatar xCss commented on June 9, 2024

抱歉,我昨天把博客回滚到老的NexT主题了,现在Deploy的是新版本的NexT了。 刚才又发现一个问题,就是我旧版的NexT的Valine插件显示的版本是V1.5.1的,新版的NexT的Valine插件显示的是V1.4.14的,不知道是不是插件版本的原因?以及我该如何调整使用的插件的版本?感谢您的回复!

看了下,新版hexo-next-valine 的版本确实是v1.4.14 , 将其更改为 https://fastly.jsdelivr.net/npm/[email protected]/dist/Valine.min.js 即可

from valine.

Cyclohexatriene avatar Cyclohexatriene commented on June 9, 2024

非常感谢,修改后Valine版本显示为V1.5.1了,但是依然无法得到评论数据,我推测是我_config.yml配置的问题。有关Valine的配置我都写在theme/next-reloaded/_config.yml文件里,除了上面提到的添加在文件末尾的Valine配置代码段外,还有另一段与评论有关的配置:

# Multiple Comment System Support
comments:
  # Available values: tabs | buttons
  style: tabs
  # Choose a comment system to be displayed by default.
  # Available values: disqus | disqusjs | changyan | livere | gitalk | utterances
  active: valine
  # Setting `true` means remembering the comment system selected by the visitor.
  storage: true
  # Lazyload all comment systems.
  lazyload: false
  # Modify texts or order for any naves, here are some examples.
  nav:
    #disqus:
    #  text: Load Disqus
    #  order: -1
    #gitalk:
    #  order: -2

请问是我配置的过程有问题吗?谢谢!

from valine.

xCss avatar xCss commented on June 9, 2024

看着有点像是你的serverURLs写错了,理论上这个值默认是空的,自定义的话应该是你在leancloud绑定的域名,而不是github.io

"serverURLs":"https://cyclohexatriene.github.io"

from valine.

Cyclohexatriene avatar Cyclohexatriene commented on June 9, 2024

您好,我将serverURLs字段清空后重新运行了hexo cleanhexo g,但依然无法得到评论数据,meta字段的配置也没有生效,或者说整个配置看起来只有placeholder字段生效了。
我刚才还尝试了把theme文件夹下原名为next-reloaded的文件夹重命名为next,问题依然存在。
现在Deploy的是清除serverURLs字段后的版本,劳烦您再帮我找一下出现问题的原因。谢谢!

valine:
  enable: true
  appId:  /* My appid */
  appKey:  /*  My appkey */
  #serverURLs: # When the custom domain name is enabled, fill it in here
  placeholder: 莫西莫西? # comment box placeholder
  avatar: mm # gravatar style
  meta: [nick] # Custom comment header
  pageSize: 10 # pagination size
  visitor: false # leancloud-counter-security is not supported for now. When visitor is set to be true, appid and appkey are recommended to be the same as leancloud_visitors' for counter compatibility. Article reading statistic https://valine.js.org/visitor.html
  comment_count: false # If false, comment count will only be displayed in post page, not in home page
  recordIP: true # Whether to record the commenter IP

from valine.

xCss avatar xCss commented on June 9, 2024

我这边显示Code 401: 未经授权的操作,请检查你的AppId和AppKey.,其他配置要看主题源文件才能知道是什么问题了。

from valine.

Cyclohexatriene avatar Cyclohexatriene commented on June 9, 2024

好的,感谢您的耐心回复,我再去研究一下!

from valine.

Related Issues (20)

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.