ppoffice / hexo-theme-icarus

A simple, delicate, and modern theme for the static site generator Hexo.
https://ppoffice.github.io/hexo-theme-icarus/
MIT License
6.4k stars 1.55k forks source link

icarus 集成github 无法留言 #341

Closed levin950825 closed 6 years ago

levin950825 commented 6 years ago

mobx.js:1335 [mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: 'Reaction[Autorun@2] TypeError: Cannot read property 'firstChild' of null
    at gitment.js:16
    at reactionRunner (mobx.js:123)
    at trackDerivedFunction (mobx.js:1000)
    at Reaction.track (mobx.js:1312)
    at Reaction.onInvalidate (mobx.js:120)
    at Reaction.runReaction (mobx.js:1288)
    at runReactionsHelper (mobx.js:1404)
    at reactionScheduler (mobx.js:1386)
    at runReactions (mobx.js:1390)
    at Reaction.schedule (mobx.js:1276)
``
ppoffice commented 6 years ago

@levin950825 https://github.com/imsun/gitment/issues/80

levin950825 commented 6 years ago

当前页面是index.html 为什么也会加载 gitment 插件呢

levin950825 commented 6 years ago

该错误只在index.html出现,在文章页调试未看到错误信息

ppoffice commented 6 years ago

@levin950825 请贴一下完整的错误日志并提供你的配置文件_config.yml

levin950825 commented 6 years ago

下面是我的 _config.yml 连接到的是 https://blog.battcn.com F12的错误信息就是开头贴的

# Menus
#permalink: :year/:month/:day/:subtitle/
menu:
  #首页: .
  #分类: categories
  #标签: tags
  SpringBoot: categories/SpringBoot
  SpringCloud(F版): tags/Finchley
  SpringCloud(大全): categories/SpringCloud
  归档: archives  
  关于: about
  论坛: http://bbs.battcn.com
  battcn-plus开源项目: http://demo.battcn.com
# Customize
customize:
    logo:
        enabled: true
        width: 40
        height: 40
        url: images/logo.png
    profile:
        enabled: true # Whether to show profile bar
        avatar: https://image.battcn.com/assets/images/battcn.jpg
        gravatar: # Gravatar email address, if you enable Gravatar, your avatar config will be overriden
        author: 唐亚峰 | battcn
        languages: zh-CN 
        author_title: 胆小认生,不易相处
        location: 上海, 中国
        follow: https://github.com/battcn/
    highlight: monokai
    sidebar: right # sidebar position, options: left, right or leave it empty
    post_sidebar: false
    home_sidebar: true
    thumbnail: true # enable posts thumbnail, options: true, false
    favicon: https://image.battcn.com/assets/images/battcn.jpg
    social_links:
        github: https://github.com/battcn/
        gg: https://gitee.com/battcn/
        envelope: mailto:1837307557@qq.com
        #dribbble: /
        rss: /atom.xml
    social_link_tooltip: true # enable the social link tooltip, options: true, false
    donate_message: 谢谢你请我吃糖果!!!
# Widgets
widgets:
    - recent_posts
    #- category
    #- archive
    - wechatPublic
    - tagcloud
    #- links

# Search
search:
    insight: true # you need to install `hexo-generator-json-content` before using Insight Search
    swiftype: # enter swiftype install key here
    baidu: false # you need to disable other search engines to use Baidu search, options: true, false

# Comment
comment:
    disqus:  # enter disqus shortname here
    duoshuo: # enter duoshuo shortname here
    youyan: # enter youyan uid here
    facebook: # enter true to enable
    isso: # enter the domain name of your own comment isso server eg. comments.example.com
    changyan: # please fill in `appid` and `conf` to enable
        appid:
        conf:
    gitment:
        owner: levin950825  #your github ID
        repo:  hexo-battcn-blog-comment #the repo to store comments
        #Register an OAuth application, and you will get a client ID and a client secret.
        client_id: caf81416940d2835acc6 #your client ID
        client_secret: 7b8ac86f49e0110917cd7597ef30852458cf8ba1 #your client secret
    livere: # enter livere uid here
    valine: # Valine Comment System https://github.com/xCss/Valine
        on:  # enter true to enable
        appId:  # enter the leancloud application appId here
        appKey: # enter the leancloud application appKey here
        notify: # enter true to enable <Mail notifier> https://github.com/xCss/Valine/wiki/Valine-%E8%AF%84%E8%AE%BA%E7%B3%BB%E7%BB%9F%E4%B8%AD%E7%9A%84%E9%82%AE%E4%BB%B6%E6%8F%90%E9%86%92%E8%AE%BE%E7%BD%AE
        verify: # enter true to enable <Validation code>
        placeholder: Just Do It # enter the comment box placeholder

# Share
#share: bdshare # options: jiathis, bdshare, addtoany, default

# Plugins
plugins:
    lightgallery: true # options: true, false
    justifiedgallery: true # options: true, false
    google_analytics: # enter the tracking ID for your Google Analytics
    google_site_verification: # enter Google site verification code
    baidu_analytics: c9c70b645d8560babe3d6fbc2793e837 # enter Baidu Analytics hash key
    mathjax: false # options: true, false

# Miscellaneous
miscellaneous:
    open_graph: # see http://ogp.me
        fb_app_id:
        fb_admins:
        twitter_id:
        google_plus:
    links:
        SAn Blog: https://sanii.cn/
levin950825 commented 6 years ago

非常感谢,按照提供的方案已经解决,谢谢