i can't config my 'about' page and my comment.ejs!
Closed this issue · 4 comments
ifcheung2012 commented
so nice theme!
17 commented
大概有什么错误呢, 再描述清楚一点吧. ^ _ ^
ifcheung2012 commented
原来是**银,描述下:
1、myblog 目录下:hexo g没问题;
2、添加about页面: hero new page "about",没问题 ;
3、hexo g,问题来了:
ifcheung at myhost in ~/Documents/WorkSpace/diary/myblog
$ hexo new page "about"
[info] File created at /Users/ifcheung/Documents/WorkSpace/diary/myblog/source/about/index.md
ifcheung at myhost in ~/Documents/WorkSpace/diary/myblog
$ hexo g
[info] Files loaded in 0.215s
[update] Generated: archives/index.html (76ms)
[update] Generated: archives/2009/index.html (7ms)
[update] Generated: archives/2009/09/index.html (7ms)
[update] Generated: archives/2010/index.html (4ms)
[update] Generated: archives/2010/11/index.html (7ms)
[update] Generated: archives/2012/index.html (14ms)
[update] Generated: archives/2012/08/index.html (11ms)
[update] Generated: archives/2012/11/index.html (9ms)
[update] Generated: archives/2013/index.html (26ms)
[update] Generated: archives/2013/02/index.html (8ms)
[update] Generated: archives/2013/07/index.html (6ms)
[update] Generated: archives/2013/08/index.html (7ms)
[update] Generated: archives/2013/10/index.html (7ms)
[update] Generated: archives/2013/11/index.html (28ms)
[update] Generated: archives/2013/12/index.html (16ms)
[update] Generated: categories/blog/index.html (9ms)
[update] Generated: index.html (47ms)
[update] Generated: page/2/index.html (41ms)
[update] Generated: page/3/index.html (23ms)
[error] HexoError: Render failed: about/index.html
TypeError: /Users/ifcheung/Documents/WorkSpace/diary/myblog/themes/modernist/layout/page.ejs:1
>> 1| <%- partial('_partial/article', {post: page, index: false}) %>
/Users/ifcheung/Documents/WorkSpace/diary/myblog/themes/modernist/layout/_partial/article.ejs:32
30| <% } %>
31| <% } else { %>
>> 32| <%- partial('post/category') %>
33| <%- partial('post/tag') %>
34| <% } %>
35| <div class="clearfix"></div>
/Users/ifcheung/Documents/WorkSpace/diary/myblog/themes/modernist/layout/_partial/post/category.ejs:3
1| <% if (post.categories && post.categories.length > 0){ %>
2| <div class="categories">
>> 3| <%- list_categories(post.categories, {
4| show_count: false,
5| class: 'categories',
6| style: 'none'
Object default has no method 'find'
at list (/opt/local/lib/node_modules/hexo/lib/plugins/helper/list.js:52:16)
at Object.exports.list_categories (/opt/local/lib/node_modules/hexo/lib/plugins/helper/list.js:95:3)
at eval (eval at <anonymous> (/Users/ifcheung/Documents/WorkSpace/diary/myblog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:29:154)
at eval (eval at <anonymous> (/Users/ifcheung/Documents/WorkSpace/diary/myblog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:33:65)
at /Users/ifcheung/Documents/WorkSpace/diary/myblog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:255:15
at Object.exports.render (/Users/ifcheung/Documents/WorkSpace/diary/myblog/node_modules/hexo-renderer-ejs/node_modules/ejs/lib/ejs.js:293:13)
at /Users/ifcheung/Documents/WorkSpace/diary/myblog/node_modules/hexo-renderer-ejs/index.js:5:14
at Object.exports.renderSync (/opt/local/lib/node_modules/hexo/lib/core/render.js:133:12)
at View.renderSync (/opt/local/lib/node_modules/hexo/lib/theme/view.js:183:28)
at partial (/opt/local/lib/node_modules/hexo/lib/plugins/helper/partial.js:29:17)
以上这段错误,我在zsh(mac)下没看到,因为底色和字体相似,好在,我复制时,显示出来了,对js不感冒,so,劳驾您了!
补充下:风格真挺好!
17 commented
你应该没有在 _config.yml
把 theme
项更换成这个主题的文件夹.
这个错误应该是 hexo-theme-modernist 主题产生的.
TypeError: /Users/ifcheung/Documents/WorkSpace/diary/myblog/themes/modernist/layout/page.ejs:1
你把主题项更换后再试试 : D
ifcheung2012 commented
# Extensions
## Plugins: https://github.com/tommy351/hexo/wiki/Plugins
## Themes: https://github.com/tommy351/hexo/wiki/Themes
#theme: strict
theme: modernist
exclude_generator:
“/myblog/_config.yml”已经更换了啊 !如果我换成 light 就没问题,如果换成modernist 还是有问题的!