hexo d
报错
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.htmlNunjucks Error: [Line 78, Column 29] expected variable end
解决办法:
官网描述
翻译过来就是: 转义内容 Hexo使用Nunjucks渲染帖子(较早的版本使用Swig,它们具有相似的语法)。用{ { } }
或{ % % }
包装的内容将被解析,并可能导致问题。您可以使用原始标签插件包装敏感内容。
找到正文里面{ {
、} }
、{ %
、% }
这样的语句,作如下修改:
{% raw %} //敏感内容前加上这个
Hello {{ sensitive }} l/敏感内容被包装在中间
{% endraw %} //敏感内容后加上这个
{ {
和} }
之间加上空格变成{ {
和} }
(这里看不出区别,知道这个意思就行…) { %
和% }
之间加上空格变成{ %
和% }