Template render error

问题

hexo g 或 hexo s时报错如下

1
2
3
4
5
6
7
8
9
10
11
12
$ hexo s
INFO Start processing
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Template render error: (unknown path)
parseIf: expected elif, else, or endif, got end of file

$ hexo g
INFO Start processing
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Template render error: (unknown path)
Error: Block "title" defined more than once.

原因

模板参数传递错误,页面中含有的错误的引用,或引用未被代码块包含,解析会出问题。

解决

仔细检查引用的参数,确保没有错误或多次定义。如果是文章中演示,应将其放入代码段中。