我在写 前端模板引擎doT.js的使用 完成后用hexo g
生成时遇到解析错误,错误信息如下:
INFO Start processing
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Template render error: (unknown path) [Line 4, Column 16]
...
...
...
后来经过多次排查,发现{{ }}
符号在作祟,在删除了文章中的{{
符号后重新使用hexo g
生成,然后成功的生成静态文件。于是我Google
了相关问题,发现也有人和我遇到同样的问题,在Github
https://github.com/hexojs/hexo/issues/1833找到了解决办法:
在需要显示{{
的地方加上{% raw %}{% endraw %}
标签,例如:{% raw %}{{abc}}{% endraw %}
渲染结果为{{abc}}
。