GithubHelp home page GithubHelp logo

Comments (13)

zlxFTH avatar zlxFTH commented on August 14, 2024

安装了hexo-reading-time还是有问题

from hexo-theme-xoxo-plus.

zlxFTH avatar zlxFTH commented on August 14, 2024

安装了hexo-reading-time还是有问题

from hexo-theme-xoxo-plus.

 avatar commented on August 14, 2024
是这个错误🐴?
Unhandled rejection ReferenceError: /Users/xfei/Blog/tlcy_github_io/themes/hexo-theme-xoxo-plus/layout/layout.ejs:8

from hexo-theme-xoxo-plus.

shuhaoc avatar shuhaoc commented on August 14, 2024
是这个错误🐴?
Unhandled rejection ReferenceError: /Users/xfei/Blog/tlcy_github_io/themes/hexo-theme-xoxo-plus/layout/layout.ejs:8

+1

from hexo-theme-xoxo-plus.

zlxFTH avatar zlxFTH commented on August 14, 2024
是这个错误🐴?
Unhandled rejection ReferenceError: /Users/xfei/Blog/tlcy_github_io/themes/hexo-theme-xoxo-plus/layout/layout.ejs:8

是的

from hexo-theme-xoxo-plus.

zlxFTH avatar zlxFTH commented on August 14, 2024

怎么办啊

from hexo-theme-xoxo-plus.

imelonkid avatar imelonkid commented on August 14, 2024

一样的问题

from hexo-theme-xoxo-plus.

imelonkid avatar imelonkid commented on August 14, 2024

感觉这个主题作者不在维护了

from hexo-theme-xoxo-plus.

fooying avatar fooying commented on August 14, 2024

如果报错信息是

Unhandled rejection ReferenceError: /Volumes/fooying/dev/test/themes/hexo-theme-xoxo-plus/layout/layout.ejs:8
    6| <body>
    7|   <div class="nav-container">
 >> 8|     <%-partial('partials/nav')%>
    9|   </div>
    10|
    11|   <div class="container" id="content-outer">

/Volumes/fooying/dev/test/themes/hexo-theme-xoxo-plus/layout/partials/nav.ejs:11
    9|   <ul class="pure-menu-list clearfix">
    10|       <% Object.keys(theme.menu).forEach(function(key) { %>
 >> 11|           <% if (_.isPlainObject(theme.menu[key])) { %>
    12|             <% if (_.indexOf(Object.values(theme.menu[key]), '/'+page.path.split('/')[0]) != -1) { %>
    13|               <li class="pure-menu-item pure-menu-has-children pure-menu-allow-hover actived">
    14|             <% } else { %>

_ is not defined

主要是hexo更新新版本后,有一些库没有默认引用了,改为了原生JS操作,解决方案:
修改模板目录下文件:layout/partials/nav.ejs

11行 <% if (Object.prototype.toString.call(theme.menu[key]) === '[object Object]') { %>
12行 <% if (Object.values(theme.menu[key]).indexOf('/'+page.path.split('/')[0]) != -1) { %>

已将fix提交到仓库,更新模板也可以

from hexo-theme-xoxo-plus.

imelonkid avatar imelonkid commented on August 14, 2024

如果报错信息是

Unhandled rejection ReferenceError: /Volumes/fooying/dev/test/themes/hexo-theme-xoxo-plus/layout/layout.ejs:8
    6| <body>
    7|   <div class="nav-container">
 >> 8|     <%-partial('partials/nav')%>
    9|   </div>
    10|
    11|   <div class="container" id="content-outer">

/Volumes/fooying/dev/test/themes/hexo-theme-xoxo-plus/layout/partials/nav.ejs:11
    9|   <ul class="pure-menu-list clearfix">
    10|       <% Object.keys(theme.menu).forEach(function(key) { %>
 >> 11|           <% if (_.isPlainObject(theme.menu[key])) { %>
    12|             <% if (_.indexOf(Object.values(theme.menu[key]), '/'+page.path.split('/')[0]) != -1) { %>
    13|               <li class="pure-menu-item pure-menu-has-children pure-menu-allow-hover actived">
    14|             <% } else { %>

_ is not defined

主要是hexo更新新版本后,有一些库没有默认引用了,改为了原生JS操作,解决方案: 修改模板目录下文件:layout/partials/nav.ejs

11行 <% if (Object.prototype.toString.call(theme.menu[key]) === '[object Object]') { %>
12行 <% if (Object.values(theme.menu[key]).indexOf('/'+page.path.split('/')[0]) != -1) { %>

已将fix提交到仓库,更新模板也可以

点赞,我今天试试

from hexo-theme-xoxo-plus.

imelonkid avatar imelonkid commented on August 14, 2024

主页面可以进来了,但是点文章详情的时候报错了
`
Unhandled rejection ReferenceError: /Users/melonkid/Workspace/myself/melon-blog/themes/hexo-theme-xoxo-plus/layout/post.ejs:28
26|
27| /

28| 阅读耗时 <%=readingTime(page.content, '分钟') %>
29|
30|
31|

readingTime is not defined
at eval (/Users/melonkid/Workspace/myself/melon-blog/themes/hexo-theme-xoxo-plus/layout/post.ejs:34:7)
at post (/Users/melonkid/Workspace/myself/melon-blog/node_modules/ejs/lib/ejs.js:682:17)
at _View._compiled (/Users/melonkid/Workspace/myself/melon-blog/node_modules/hexo/lib/theme/view.js:136:50)
at _View.render (/Users/melonkid/Workspace/myself/melon-blog/node_modules/hexo/lib/theme/view.js:39:17)
at /Users/melonkid/Workspace/myself/melon-blog/node_modules/hexo/lib/hexo/index.js:64:21
at tryCatcher (/Users/melonkid/Workspace/myself/melon-blog/node_modules/bluebird/js/release/util.js:16:23)
at /Users/melonkid/Workspace/myself/melon-blog/node_modules/bluebird/js/release/method.js:15:34
at RouteStream.read (/Users/melonkid/Workspace/myself/melon-blog/node_modules/hexo/lib/hexo/router.js:47:5)
at RouteStream.Readable.read (node:internal/streams/readable:487:10)
at resume
(node:internal/streams/readable:987:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

Unhandled rejection ReferenceError: /Users/melonkid/Workspace/myself/melon-blog/themes/hexo-theme-xoxo-plus/layout/post.ejs:28
26|
27| /

28| 阅读耗时 <%=readingTime(page.content, '分钟') %>
29|
30|
31|

readingTime is not defined
at eval (/Users/melonkid/Workspace/myself/melon-blog/themes/hexo-theme-xoxo-plus/layout/post.ejs:34:7)
at post (/Users/melonkid/Workspace/myself/melon-blog/node_modules/ejs/lib/ejs.js:682:17)
at _View._compiled (/Users/melonkid/Workspace/myself/melon-blog/node_modules/hexo/lib/theme/view.js:136:50)
at _View.render (/Users/melonkid/Workspace/myself/melon-blog/node_modules/hexo/lib/theme/view.js:39:17)
at /Users/melonkid/Workspace/myself/melon-blog/node_modules/hexo/lib/hexo/index.js:64:21
at tryCatcher (/Users/melonkid/Workspace/myself/melon-blog/node_modules/bluebird/js/release/util.js:16:23)
at /Users/melonkid/Workspace/myself/melon-blog/node_modules/bluebird/js/release/method.js:15:34
at RouteStream.read (/Users/melonkid/Workspace/myself/melon-blog/node_modules/hexo/lib/hexo/router.js:47:5)
at RouteStream.Readable.read (node:internal/streams/readable:487:10)
at resume
(node:internal/streams/readable:987:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
`

from hexo-theme-xoxo-plus.

imelonkid avatar imelonkid commented on August 14, 2024

Unhandled rejection ReferenceError: /Users/melonkid/Workspace/myself/melon-blog/themes/hexo-theme-xoxo-plus/layout/post.ejs:28
26|
27| /

28| 阅读耗时 <%=readingTime(page.content, '分钟') %>
29|
30|
31|

readingTime is not defined
at eval (/Users/melonkid/Workspace/myself/melon-blog/themes/hexo-theme-xoxo-plus/layout/post.ejs:34:7)
at post (/Users/melonkid/Workspace/myself/melon-blog/node_modules/ejs/lib/ejs.js:682:17)
at _View._compiled (/Users/melonkid/Workspace/myself/melon-blog/node_modules/hexo/lib/theme/view.js:136:50)
at _View.render (/Users/melonkid/Workspace/myself/melon-blog/node_modules/hexo/lib/theme/view.js:39:17)
at /Users/melonkid/Workspace/myself/melon-blog/node_modules/hexo/lib/hexo/index.js:64:21
at tryCatcher (/Users/melonkid/Workspace/myself/melon-blog/node_modules/bluebird/js/release/util.js:16:23)
at /Users/melonkid/Workspace/myself/melon-blog/node_modules/bluebird/js/release/method.js:15:34
at RouteStream.read (/Users/melonkid/Workspace/myself/melon-blog/node_modules/hexo/lib/hexo/router.js:47:5)
at RouteStream.Readable.read (node:internal/streams/readable:487:10)
at resume
(node:internal/streams/readable:987:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

Unhandled rejection ReferenceError: /Users/melonkid/Workspace/myself/melon-blog/themes/hexo-theme-xoxo-plus/layout/post.ejs:28
26|
27| /

28| 阅读耗时 <%=readingTime(page.content, '分钟') %>
29|
30|
31|

readingTime is not defined
at eval (/Users/melonkid/Workspace/myself/melon-blog/themes/hexo-theme-xoxo-plus/layout/post.ejs:34:7)
at post (/Users/melonkid/Workspace/myself/melon-blog/node_modules/ejs/lib/ejs.js:682:17)
at _View._compiled (/Users/melonkid/Workspace/myself/melon-blog/node_modules/hexo/lib/theme/view.js:136:50)
at _View.render (/Users/melonkid/Workspace/myself/melon-blog/node_modules/hexo/lib/theme/view.js:39:17)
at /Users/melonkid/Workspace/myself/melon-blog/node_modules/hexo/lib/hexo/index.js:64:21
at tryCatcher (/Users/melonkid/Workspace/myself/melon-blog/node_modules/bluebird/js/release/util.js:16:23)
at /Users/melonkid/Workspace/myself/melon-blog/node_modules/bluebird/js/release/method.js:15:34
at RouteStream.read (/Users/melonkid/Workspace/myself/melon-blog/node_modules/hexo/lib/hexo/router.js:47:5)
at RouteStream.Readable.read (node:internal/streams/readable:487:10)
at resume
(node:internal/streams/readable:987:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

from hexo-theme-xoxo-plus.

fooying avatar fooying commented on August 14, 2024

readingTime is not defined问题请先在模板目录下执行npm install 安装hexo-reading-time

from hexo-theme-xoxo-plus.

Related Issues (4)

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.