今天在写博客的时候,渲染的时候发生了一些问题,主要报错如下

1
[ERROR][hexo-renderer-pandoc] pandoc exited with code null.

看了一些博主的方案,也进行了尝试,但是结果并不是很好,但是自己经过摸索还是解决了,便是来写一下相关的解决方案。

第一种是将 hexo-renderer-pandoc 卸载

1
npm remove --save hexo-renderer-pandoc

但是呢,卸载之后,hexo 的渲染器就需要重新装配,不符合我的需求。

第二种则是在 Linux 之下的的一个官方的解决方法

1
2
3
4
5
6
7
8
9
10
11
name: Simple Usage

on: push

jobs:
convert_via_pandoc:
runs-on: ubuntu-18.04
steps:
- uses: docker://pandoc/core:2.9
with:
args: "--help" # gets appended to pandoc command

第三种就是我大概摸索到的一个方法,即下载 pandoc,因为我是 windows,然后 push 到 github 进行部署的。下载地址如下: Releases · jgm/pandoc (github.com)

安装之后重新开启命令行进行部署即可。