hexo博客主题,git上传,报错Template render error的解决方案

报错信息

INFO  Start processing
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/do                                                                                                                                                                                               cs/troubleshooting.html
Template render error: (unknown path) [Line 310, Column 115]
  expected variable end

根据提示,可以进入参考网站

http://hexo.io/docs/troubleshooting.html

网站内的提供的问题来源是
1、主题的配置文件config.yml中有问题,很有可能是配置文件没有有空格隔开。
首先到主题目录下,打开config.yml文件。。。。我的是yilia主题

..\themes\yilia\config.yml

然后文内有没有以下情况

错误:
  主页:/
  全部文章:/archives
正确:
  主页: /
  全部文章: /archives

正确格式:配置项跟后面的参数是有空格的

2、我的问题是出现在第二项,也就是自己写的文章内有一些不能用的字符,导致.md格式文章转换报错

..\source\_posts目录下的文章

解决方案:仔细检查..\source\_posts目录下的文章,有没有“{ }”等符号,或者代码没有被放入代码框内

.md文件格式是markdown,可以用三个停顿点表示代码框
```中间写上代码```

方便的方法就是全文都用停顿号注释起来,既不用检查了

猜你喜欢

转载自blog.csdn.net/Aoman_Hao/article/details/81351313
今日推荐