Nunjucks Error expected variable end解决办法

    技术2022-07-11  64

    问题描述

    Nunjucks Error expected variable end解决办法

    hexo g,hexo s都报错

    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

    出错截图:

    解决办法

    官网描述如下(https://hexo.io/docs/troubleshooting.html): 翻译过来就是: 转义内容 Hexo使用Nunjucks渲染帖子(较早的版本使用Swig,它们具有相似的语法)。用{ { } }或{ % % }包装的内容将被解析,并可能导致问题。您可以使用原始标签插件包装敏感内容。 找到正文里面{ {、} }、{ %、% }这样的语句,作如下修改:

    其他方法

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

    Processed: 0.013, SQL: 9