ppoffice / hexo-theme-hueman

A redesign of Alx's wordpress theme Hueman, ported to Hexo.
http://ppoffice.github.io/hexo-theme-hueman/
GNU General Public License v2.0
1.17k stars 335 forks source link

WARN No layout: index.html #156

Closed buweilv closed 7 years ago

buweilv commented 7 years ago

将主题配置文件_config.yml.example修改成_config.yml了,在blog的配置文件中主题设置为:theme: hueman,hexo s,访问localhost:4000的时候仍然出现:

INFO  Start processing
INFO  Hexo is running at http://localhost:4000/. Press Ctrl+C to stop.
WARN  No layout: index.html
ppoffice commented 7 years ago

请提供一些其它信息

buweilv commented 7 years ago

themes目录信息,两个文件夹: hexo-theme-hueman/ landscape/ hexo-theme-hueman目录信息: _config.yml languages/ layout/ LICENSE package.json README.md scripts/ source/

hexo g执行出现以下信息:
INFO  Start processing
INFO  Files loaded in 126 ms
WARN  No layout: 2016/11/17/hello-world/index.html
WARN  No layout: archives/index.html
WARN  No layout: archives/2016/index.html
WARN  No layout: archives/2016/11/index.html
WARN  No layout: index.html
ERROR Asset render failed: css/style.css
CoercionError: /home/buwei/blog/themes/hexo-theme-hueman/source/css/_variables.styl:38:54
   34| line-height-title = 1.3em
   35| 
   36| // Header
   37| logo-url = hexo-config("customize.logo.url")
   38| logo-width = 0px + hexo-config("customize.logo.width")
------------------------------------------------------------^
   39| logo-height = 0px + hexo-config("customize.logo.height")
   40| 
   41| // Sidebar

cannot coerce '' to unit

    at Unit.coerce (/home/buwei/blog/node_modules/stylus/lib/nodes/node.js:248:11)
    at Unit.coerce (/home/buwei/blog/node_modules/stylus/lib/nodes/unit.js:209:43)
    at Unit.operate (/home/buwei/blog/node_modules/stylus/lib/nodes/unit.js:132:20)
    at Evaluator.visitBinOp (/home/buwei/blog/node_modules/stylus/lib/visitor/evaluator.js:567:28)
    at Evaluator.Visitor.visit (/home/buwei/blog/node_modules/stylus/lib/visitor/index.js:28:40)
    at Evaluator.visit (/home/buwei/blog/node_modules/stylus/lib/visitor/evaluator.js:156:18)
    at Evaluator.visitExpression (/home/buwei/blog/node_modules/stylus/lib/visitor/evaluator.js:630:26)
    at Evaluator.Visitor.visit (/home/buwei/blog/node_modules/stylus/lib/visitor/index.js:28:40)
    at Evaluator.visit (/home/buwei/blog/node_modules/stylus/lib/visitor/evaluator.js:156:18)
    at Evaluator.visitIdent (/home/buwei/blog/node_modules/stylus/lib/visitor/evaluator.js:537:22)
    at Evaluator.Visitor.visit (/home/buwei/blog/node_modules/stylus/lib/visitor/index.js:28:40)
    at Evaluator.visit (/home/buwei/blog/node_modules/stylus/lib/visitor/evaluator.js:156:18)
    at Evaluator.visitBlock (/home/buwei/blog/node_modules/stylus/lib/visitor/evaluator.js:706:39)
    at Evaluator.Visitor.visit (/home/buwei/blog/node_modules/stylus/lib/visitor/index.js:28:40)
    at Evaluator.visit (/home/buwei/blog/node_modules/stylus/lib/visitor/evaluator.js:156:18)
    at Evaluator.importFile (/home/buwei/blog/node_modules/stylus/lib/visitor/evaluator.js:95:18)
    at Evaluator.visitImport (/home/buwei/blog/node_modules/stylus/lib/visitor/evaluator.js:906:27)
    at Evaluator.Visitor.visit (/home/buwei/blog/node_modules/stylus/lib/visitor/index.js:28:40)
    at Evaluator.visit (/home/buwei/blog/node_modules/stylus/lib/visitor/evaluator.js:156:18)
    at Evaluator.visitRoot (/home/buwei/blog/node_modules/stylus/lib/visitor/evaluator.js:693:27)
    at Evaluator.Visitor.visit (/home/buwei/blog/node_modules/stylus/lib/visitor/index.js:28:40)
    at Evaluator.visit (/home/buwei/blog/node_modules/stylus/lib/visitor/evaluator.js:156:18)
    at Evaluator.evaluate (/home/buwei/blog/node_modules/stylus/lib/visitor/evaluator.js:233:15)
    at Renderer.render (/home/buwei/blog/node_modules/stylus/lib/renderer.js:86:26)
    at Hexo.module.exports (/home/buwei/blog/node_modules/hexo-renderer-stylus/lib/renderer.js:53:6)
    at Hexo.tryCatcher (/home/buwei/blog/node_modules/bluebird/js/release/util.js:16:23)
    at Hexo.ret (eval at makeNodePromisifiedEval (/usr/local/lib/node_modules/.hexo-cli_npminstall/node_modules/.3.4.6@bluebird/js/release/promisify.js:184:12), <anonymous>:13:39)
    at /home/buwei/blog/node_modules/hexo/lib/hexo/render.js:61:21
INFO  0 files generated in 407 ms
ppoffice commented 7 years ago

@buweilv 请把hexo-theme-hueman文件夹重命名成hueman

buweilv commented 7 years ago

@ppoffice 我已经重命名文件名,但是执行hexo g会出现如下错误,对js完全不了解,不太清楚这个错误的意思,还需要提供哪些信息请告知。

➜  blog git:(hexo) ✗ hexo g
INFO  Start processing
INFO  Files loaded in 301 ms
Unhandled rejection TypeError: /home/buwei/blog/themes/hueman/layout/layout.ejs:1
 >> 1| <%- partial('common/head') %>
    2| <body>
    3|     <div id="wrap">
    4|         <%- partial('common/header', null, {cache: !config.relative_link}) %>

/home/buwei/blog/themes/hueman/layout/common/head.ejs:30
    28|         <meta name="keywords" content="<%= keywords.join(',') %>" />
    29|     <% } %>
 >> 30|     <%- open_graph({
    31|         image:          thumbnail(page),
    32|         fb_app_id:      theme.miscellaneous.open_graph.fb_app_id,
    33|         fb_admins:      theme.miscellaneous.open_graph.fb_admins,

Cannot read property 'open_graph' of undefined
    at eval (eval at <anonymous> (/home/buwei/blog/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:51:44)
    at eval (eval at <anonymous> (/home/buwei/blog/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:55:1071)
    at /home/buwei/blog/node_modules/ejs/lib/ejs.js:255:15
    at _compiledSync (/home/buwei/blog/node_modules/hexo/lib/theme/view.js:122:20)
    at View.renderSync (/home/buwei/blog/node_modules/hexo/lib/theme/view.js:50:21)
    at Object.partial (/home/buwei/blog/node_modules/hexo/lib/plugins/helper/partial.js:42:17)
    at Object.wrapper (/home/buwei/blog/node_modules/lodash/lodash.js:4994:19)
    at eval (eval at <anonymous> (/home/buwei/blog/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:30:35)
    at eval (eval at <anonymous> (/home/buwei/blog/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:30:973)
    at /home/buwei/blog/node_modules/ejs/lib/ejs.js:255:15
    at _compiled (/home/buwei/blog/node_modules/hexo/lib/theme/view.js:127:30)
    at View.render (/home/buwei/blog/node_modules/hexo/lib/theme/view.js:29:15)
    at /home/buwei/blog/node_modules/hexo/lib/theme/view.js:40:23
    at tryCatcher (/home/buwei/blog/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/buwei/blog/node_modules/bluebird/js/release/promise.js:510:31)
    at Promise._settlePromise (/home/buwei/blog/node_modules/bluebird/js/release/promise.js:567:18)
    at Promise._settlePromise0 (/home/buwei/blog/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/home/buwei/blog/node_modules/bluebird/js/release/promise.js:691:18)
    at Async._drainQueue (/home/buwei/blog/node_modules/bluebird/js/release/async.js:138:16)
    at Async._drainQueues (/home/buwei/blog/node_modules/bluebird/js/release/async.js:148:10)
    at Immediate.Async.drainQueues (/home/buwei/blog/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:637:20)
    at tryOnImmediate (timers.js:610:5)
    at processImmediate [as _immediateCallback] (timers.js:582:5)

hexo blog的配置如下:

# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# Site
title: Unknown Unknown
subtitle:
description:
author: Buwei
language: zh-CN
timezone:

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://buweilv.github.io
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:

# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
  enable: true
  line_number: true
  auto_detect: false
  tab_replace:

# Category & Tag
default_category: uncategorized
category_map:
tag_map:

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss

# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: hueman

# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
  type: git
  repo: git@github.com:buweilv/buweilv.github.io.git
  branch: master

# Disqus
disqus_shortname: buwei
ppoffice commented 7 years ago

@buweilv 你的Node和Hexo的版本是多少?尝试升级?

buweilv commented 7 years ago

@ppoffice node版本:

➜  blog git:(hexo) node -v
v6.9.1

hexo版本:

➜  blog git:(hexo) hexo -v
hexo: 3.2.2
hexo-cli: 1.0.2
os: Linux 4.4.0-47-generic linux x64
http_parser: 2.7.0
node: 6.9.1
v8: 5.1.281.84
uv: 1.9.1
zlib: 1.2.8
ares: 1.10.1-DEV
icu: 56.1
modules: 48
openssl: 1.0.2j

因为之前执行hexo init以及npm install的时候node版本使用ubuntu16.04自带的4.x的版本,我估计是之前的安装包的版本过低吧,虽然后面升级Node,尝试升级包也没全面升级?现在已经将整个文件夹删除重新部署仍然是这个问题,这里是package.json中的内容:

  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "hexo": {
    "version": "3.2.2"
  },
  "dependencies": {
    "hexo": "^3.2.0",
    "hexo-generator-archive": "^0.1.4",
    "hexo-generator-category": "^0.1.3",
    "hexo-generator-index": "^0.2.0",
    "hexo-generator-tag": "^0.2.0",
    "hexo-renderer-ejs": "^0.2.0",
    "hexo-renderer-stylus": "^0.3.1",
    "hexo-renderer-marked": "^0.2.10",
    "hexo-server": "^0.2.0"
  }
}
ppoffice commented 7 years ago

@buweilv 可能是Hexo的其他依赖版本过低了,你可以参考这个主题的site分支。