github配置问题

  • 一级域名显示404
    github中创建的repo地址必须是 [githubname].github.io, github必须和github用户名相一致

hexo配置问题

主题配置

  • 错误信息如下
1
2
3
4
5
6
7
8
9
10
11
12
13
14
H:\Hexo>hexo g
INFO Start processing
INFO Files loaded in 2.4 s
WARN No layout: 2016/12/11/hello-world/index.html
WARN No layout: archives/index.html
WARN No layout: archives/2016/index.html
WARN No layout: archives/2016/12/index.html
WARN No layout: index.html
INFO Generated: index.html
INFO Generated: archives/index.html
INFO Generated: archives/2016/12/index.html
INFO Generated: archives/2016/index.html
INFO Generated: 2016/12/11/hello-world/index.html
INFO 5 files generated in 50 ms

原因是下载到本地的主题没有改名字,主题名称应该和配置文件(_config.yml)文件中的主题一致。

  • 使用maupassant主题,必须安装两个包
1
2
npm install hexo-renderer-sass --save
npm install hexo-renderer-jade --save

如果出现警告信息

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {“os”:”darwin”,”arch”:”any”} (current: {“os”:”win32”,”arch”:”x64”})

官网给出的提示是

solution:you are both experiencing a warning that is perfectly normal and will not cause any issues for development. When using OS X there’s a nice filesystem feature provided by the OS by which file changes emit events, making “watching” files for changes the reverse, where they’re passively “listened” for (Change Detection vs an Event Emitter if you need an analogy).
This is made possible by fsevents, a package that is only available for OS X and macOS installations due to dependence on the OS’s functionality. Windows and *nix will all see this warning. I haven’t tested it, but the only non-proprietary OS that might have support would be the Darwin open source project.
所以这个警告信息可以忽略。

添加google sitemap不能通过验证

如果在markdown中添加meta标签的方法,hexo在generate的过程中会添加很多别的代码。所以直接添加的代码不能被识别。可以尝试直接在html文件当中添加meta标签的方法。