Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled rejection TypeError: /var/www/hexo/themes/hexo-theme-material/layout/index.ejs:3 #2

Closed
ghost opened this issue Oct 6, 2016 · 0 comments

Comments

@ghost
Copy link

ghost commented Oct 6, 2016

  • 与主题配置有关的config:
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: hexo-theme-material
  • 当我执行hexo serve后,并访问站点得到了如下报错:
INFO  Start processing
INFO  Hexo is running at http://localhost:4000/. Press Ctrl+C to stop.
Unhandled rejection TypeError: /var/www/hexo/themes/hexo-theme-material/layout/index.ejs:3
    1| <!-- Index Module -->
    2| <div class="demo-blog__posts mdl-grid">
 >> 3|     <%- partial("_partial/daily_pic") %>
    4|     <%- partial("_partial/blog_info") %>
    5|     
    6|     <% page.posts.each(function(post) { %>

/var/www/hexo/themes/hexo-theme-material/layout/_partial/daily_pic.ejs:5
    3|     
    4|     <!-- Pic & Slogan -->
 >> 5|     <div class="mdl-card__media mdl-color-text--grey-50" style="background-image:url(<%= theme.img.daily_pic %>)">
    6|         <p class="index-top-block-slogan"><a href="<%= theme.url.logo %>"><%= theme.uiux.slogan %></a></p>
    7|     </div>
    8| 

Cannot read property 'daily_pic' of undefined
    at eval (eval at <anonymous> (/var/www/hexo/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:30:264)
    at eval (eval at <anonymous> (/var/www/hexo/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:30:907)
    at /var/www/hexo/node_modules/ejs/lib/ejs.js:255:15
    at _compiledSync (/var/www/hexo/node_modules/hexo/lib/theme/view.js:122:20)
    at View.renderSync (/var/www/hexo/node_modules/hexo/lib/theme/view.js:50:21)
    at Object.partial (/var/www/hexo/node_modules/hexo/lib/plugins/helper/partial.js:42:17)
    at Object.wrapper (/var/www/hexo/node_modules/lodash/lodash.js:4921:19)
    at eval (eval at <anonymous> (/var/www/hexo/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:30:103)
    at eval (eval at <anonymous> (/var/www/hexo/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:36:175)
    at /var/www/hexo/node_modules/ejs/lib/ejs.js:255:15
    at _compiled (/var/www/hexo/node_modules/hexo/lib/theme/view.js:127:30)
    at View.render (/var/www/hexo/node_modules/hexo/lib/theme/view.js:29:15)
    at /var/www/hexo/node_modules/hexo/lib/hexo/index.js:387:25
    at tryCatcher (/var/www/hexo/node_modules/bluebird/js/release/util.js:16:23)
    at /var/www/hexo/node_modules/bluebird/js/release/method.js:15:34
    at RouteStream._read (/var/www/hexo/node_modules/hexo/lib/hexo/router.js:134:3)
    at RouteStream.Readable.read (_stream_readable.js:348:10)
    at resume_ (_stream_readable.js:737:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

@ghost ghost closed this as completed Oct 6, 2016
cubesky added a commit that referenced this issue Jan 5, 2017
iblh pushed a commit that referenced this issue Jan 11, 2017
geekhal pushed a commit to geekhal/hexo-theme-material that referenced this issue Aug 26, 2018
geekhal pushed a commit to geekhal/hexo-theme-material that referenced this issue Aug 26, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants