blinkfox / hexo-theme-matery

A beautiful hexo blog theme with material design and responsive design.一个基于材料设计和响应式设计而成的全面、美观的Hexo主题。国内访问:http://blinkfox.com
https://blinkfox.github.io/
Apache License 2.0
5.24k stars 1.25k forks source link

wordcount is not defined 文章字数统计和阅读时长统计开启都会报错 #391

Closed 9Chestnut closed 4 years ago

9Chestnut commented 4 years ago

Unhandled rejection ReferenceError: E:\Git\Blog\themes\matery\layout\post.ejs:26 24| 25| <% if (isTocEnable) { %>

26| <%- partial('_partial/post-detail-toc.ejs') %> 27| <% } else { %> 28| <%- partial('_partial/post-detail.ejs') %> 29| <% } %>

E:\Git\Blog\themes\matery\layout_partial\post-detail-toc.ejs:96 94|

95|

96| <%- partial('_partial/post-detail.ejs') %> 97|

98|
99|

E:\Git\Blog\themes\matery\layout_partial\post-detail.ejs:53 51|

52| <%- __('wordCount') %>:  

53| <%= wordcount(page.content) %> 54|

55| <% } %> 56|

wordcount is not defined at eval (E:\Git\Blog\themes\matery\layout_partial\post-detail.ejs:82:7) at post-detail (E:\Git\Blog\node_modules\ejs\lib\ejs.js:682:17) at viewFn._compiledSync (E:\Git\Blog\node_modules\hexo\lib\theme\view.js:132:22) at viewFn.View.renderSync (E:\Git\Blog\node_modules\hexo\lib\theme\view.js:60:23) at Object.partial (E:\Git\Blog\node_modules\hexo\lib\plugins\helper\partial.js:34:15) at eval (E:\Git\Blog\themes\matery\layout_partial\post-detail-toc.ejs:12:17) at post-detail-toc (E:\Git\Blog\node_modules\ejs\lib\ejs.js:682:17) at viewFn._compiledSync (E:\Git\Blog\node_modules\hexo\lib\theme\view.js:132:22) at viewFn.View.renderSync (E:\Git\Blog\node_modules\hexo\lib\theme\view.js:60:23) at Object.partial (E:\Git\Blog\node_modules\hexo\lib\plugins\helper\partial.js:34:15) at eval (E:\Git\Blog\themes\matery\layout\post.ejs:45:17) at post (E:\Git\Blog\node_modules\ejs\lib\ejs.js:682:17) at viewFn._compiled (E:\Git\Blog\node_modules\hexo\lib\theme\view.js:136:48) at viewFn.View.render (E:\Git\Blog\node_modules\hexo\lib\theme\view.js:41:15) at E:\Git\Blog\node_modules\hexo\lib\hexo\index.js:61:21 at tryCatcher (E:\Git\Blog\node_modules\bluebird\js\release\util.js:16:23) at E:\Git\Blog\node_modules\bluebird\js\release\method.js:15:34 at RouteStream._read (E:\Git\Blog\node_modules\hexo\lib\hexo\router.js:126:3) at RouteStream.Readable.read (_streamreadable.js:478:10) at resume (_stream_readable.js:965:12) at processTicksAndRejections (internal/process/task_queues.js:84:21) Unhandled rejection ReferenceError: E:\Git\Blog\themes\matery\layout\post.ejs:26 24| 25| <% if (isTocEnable) { %>

26| <%- partial('_partial/post-detail-toc.ejs') %> 27| <% } else { %> 28| <%- partial('_partial/post-detail.ejs') %> 29| <% } %>

E:\Git\Blog\themes\matery\layout_partial\post-detail-toc.ejs:96 94|

95|

96| <%- partial('_partial/post-detail.ejs') %> 97|

98|
99|

E:\Git\Blog\themes\matery\layout_partial\post-detail.ejs:53 51|

52| <%- __('wordCount') %>:  

53| <%= wordcount(page.content) %> 54|

55| <% } %> 56|

wordcount is not defined at eval (E:\Git\Blog\themes\matery\layout_partial\post-detail.ejs:82:7) at post-detail (E:\Git\Blog\node_modules\ejs\lib\ejs.js:682:17) at viewFn._compiledSync (E:\Git\Blog\node_modules\hexo\lib\theme\view.js:132:22) at viewFn.View.renderSync (E:\Git\Blog\node_modules\hexo\lib\theme\view.js:60:23) at Object.partial (E:\Git\Blog\node_modules\hexo\lib\plugins\helper\partial.js:34:15) at eval (E:\Git\Blog\themes\matery\layout_partial\post-detail-toc.ejs:12:17) at post-detail-toc (E:\Git\Blog\node_modules\ejs\lib\ejs.js:682:17) at viewFn._compiledSync (E:\Git\Blog\node_modules\hexo\lib\theme\view.js:132:22) at viewFn.View.renderSync (E:\Git\Blog\node_modules\hexo\lib\theme\view.js:60:23) at Object.partial (E:\Git\Blog\node_modules\hexo\lib\plugins\helper\partial.js:34:15) at eval (E:\Git\Blog\themes\matery\layout\post.ejs:45:17) at post (E:\Git\Blog\node_modules\ejs\lib\ejs.js:682:17) at viewFn._compiled (E:\Git\Blog\node_modules\hexo\lib\theme\view.js:136:48) at viewFn.View.render (E:\Git\Blog\node_modules\hexo\lib\theme\view.js:41:15) at E:\Git\Blog\node_modules\hexo\lib\hexo\index.js:61:21 at tryCatcher (E:\Git\Blog\node_modules\bluebird\js\release\util.js:16:23) at E:\Git\Blog\node_modules\bluebird\js\release\method.js:15:34 at RouteStream._read (E:\Git\Blog\node_modules\hexo\lib\hexo\router.js:126:3) at RouteStream.Readable.read (_streamreadable.js:478:10) at resume (_stream_readable.js:965:12) at processTicksAndRejections (internal/process/task_queues.js:84:21)

cytsese commented 1 year ago

一样问题,而且配置改回去后也还是报错