fi3ework / hexo-theme-archer

🎯 A smart and modern theme for Hexo.
https://fi3ework.github.io/hexo-theme-archer
MIT License
1.52k stars 273 forks source link

页面无法访问 #231

Closed lsjrepo closed 3 years ago

lsjrepo commented 5 years ago

「描述遇到的问题」或「发现的 bug」(Describe the problem or bug you encounter) 博客页面无法访问 你是否已经阅读过以下内容,并确认你的行为是正确的,在 [ ] 中填入 x 选中(Ensure that you had consulted followings and confirm the validity of your operation, fill x in [ ] to select)

如何复现(To Reproduce)

存在问题或 bug 的已部署上线的页面地址(A deployed page link that with bug or problem)

如果可能是与 markdown 内容相关的问题或 bug,请粘贴对应的 markdown 内容(If the problem or bug that may be related to markdown, paste it here)

打开控制台,填写控制台中打印的主题的版本,如果脚本出错可直接提供控制台截图(Open the console and report the version of hexo-theme-archer. You can paste the screenshot on console directly if there is error with script) Unhandled rejection ReferenceError: C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\themes\archer\layout\layout.ejs:15 13| <%- partial('_partial/base-header') %> 14|

15| <%- partial('_partial/base-background-image') %> 16| <%- partial('_partial/script/font-loader') %> 17| 18|

C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\themes\archer\layout_partial\base-background-image.ejs:63 61| <% if(theme.reading_info) { %> 62|

63| <%- __('word_count') %>: <%= wordcount(page.content) %><%= __('reading_time') %>: <%= min2read(page.content) %> min 64|

65| <% } %> 66|

wordcount is not defined at eval (eval at compile (C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\ejs\lib\ejs.js:549:12), :126:7) at returnedFn (C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\ejs\lib\ejs.js:580:17) at Theme._View.View._compiledSync (C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\hexo\lib\theme\view.js:120:22) at Theme._View.View.View.renderSync (C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\hexo\lib\theme\view.js:48:23) at Object.partial (C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\hexo\lib\plugins\helper\partial.js:39:15) at Object.wrapper [as partial] (C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\lodash\lodash.js:4941:19) at eval (eval at compile (C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\ejs\lib\ejs.js:549:12), :35:17) at returnedFn (C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\ejs\lib\ejs.js:580:17) at Theme._View.View._compiled (C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\hexo\lib\theme\view.js:124:48) at Theme._View.View.View.render (C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\hexo\lib\theme\view.js:29:15) at C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\hexo\lib\theme\view.js:40:23 at tryCatcher (C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\bluebird\js\release\util.js:16:23) at Promise._settlePromiseFromHandler (C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\bluebird\js\release\promise.js:512:31) at Promise._settlePromise (C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\bluebird\js\release\promise.js:569:18) at Promise._settlePromise0 (C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\bluebird\js\release\promise.js:614:10) at Promise._settlePromises (C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\bluebird\js\release\promise.js:693:18) at Async._drainQueue (C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\bluebird\js\release\async.js:133:16) at Async._drainQueues (C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\bluebird\js\release\async.js:143:10) at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\Administrator\Desktop\学习资料等\hexoblog\myblog\node_modules\bluebird\js\release\async.js:17:14) at processImmediate (internal/timers.js:439:21)

信息 (please complete the following information):

  • 操作系统(OS): [e.g. iOS]
  • 浏览器(Browser) [e.g. chrome, safari]
  • 浏览器版本(Version)[e.g. 22][可选] hexo: 3.6.0 hexo-cli: 2.0.0 os: Windows_NT 6.1.7601 win32 x64 node: 12.5.0 v8: 7.5.288.22-node.14 uv: 1.29.1 zlib: 1.2.11 brotli: 1.0.7 ares: 1.15.0 modules: 72 nghttp2: 1.38.0 napi: 4 llhttp: 1.1.4 http_parser: 2.8.0 openssl: 1.1.1c cldr: 35.1 icu: 64.2 tz: 2019a unicode: 12.1

其他信息(Additional context)

fan-97 commented 5 years ago

请问解决了吗,我跟你一样的问题

lsjrepo commented 5 years ago

请问解决了吗,我跟你一样的问题

没有,注掉了,那块功能有点问题。

fan-97 commented 5 years ago

请问解决了吗,我跟你一样的问题

没有,注掉了,那块功能有点问题。

想问一下 注释哪里呢?我没找到地方 可以说下吗 谢谢

Stark-X commented 3 years ago

请问还能复现吗? @fan-97

LolipopJ commented 3 years ago

您没有为 Hexo 安装 wordcount 插件,导致渲染失败。安装博客时,请参考安装步骤进行。

# 在 Hexo 根目录下执行下面的命令
npm i hexo-generator-json-content --save && npm i --save hexo-wordcount && git clone https://github.com/fi3ework/hexo-theme-archer.git themes/archer --depth=1

和这个 Issue 类似,这个回答解决了问题。