GeekaholicLin / hexo-theme-ylion

:blush: 说不定是一个让你感到惊喜的hexo主题 :beers: :candy:
http://blog.geekaholic.cn
MIT License
120 stars 30 forks source link

Disqus 設定後不能正常建置 #52

Closed mosdeo closed 6 years ago

mosdeo commented 6 years ago

我的設置是這樣

## comments -- 评论框
### disqus
disqus_shortname: mosdeo-github-io
### duoshuo
duoshuo_shortname:
### gitment
gitment:

hexo g 每一篇文章都會出現如下錯誤

ERROR /home/LKY/mosdeo_github_io/themes/ylion/layout/layout.ejs:1
 >> 1| <%- partial('_partial/head') %>
    2| <body id="<%= "404 Not Found" === (page.title && page.title.trim()) ? 'error-page' : 'normal'%>">
    3| <%- partial('_partial/_head-sections/IE',null,{cache: !config.relative_link}) %>
    4| <div id="wrap">

/home/LKY/mosdeo_github_io/themes/ylion/layout/_partial/head.ejs:17
    15|     <%- partial('_head-sections/title') %>
    16|     <%- partial('_head-sections/style') %>
 >> 17|     <%- partial('_head-sections/script') %>
    18|     <%- partial('_thirdParty/baidu_an') %>
    19|     <%- partial('_thirdParty/google_analytics') %>
    20| </head>

/home/LKY/mosdeo_github_io/themes/ylion/layout/_partial/_head-sections/script.ejs:24
    22| <!--<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>-->
    23|
 >> 24| <% if(theme.gitment.enable && is_post()){ %>
    25| <%- js("/js/thirdParty/gitment.browser.min.js") %>
    26| <script>
    27|   var labels = "<%= theme.gitment.labels %>";

Cannot read property 'enable' of null
GeekaholicLin commented 6 years ago

@mosdeo 把配置改成下面的试试:

## comments -- 评论框
### disqus
disqus_shortname: mosdeo-github-io
### duoshuo
duoshuo_shortname:
### gitment
gitment:
  - enable: false