Nunjucks Error: 解决方案

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 %}	//敏感内容后加上这个

{ {} }之间加上空格变成{ {} } (这里看不出区别,知道这个意思就行…) { %% }之间加上空格变成{ %% }

猜你喜欢

转载自blog.csdn.net/weixin_45333934/article/details/108274320
今日推荐