Giter Site home page Giter Site logo

hexo s error about hexo-renderer-pandoc HOT 16 CLOSED

hexojs avatar hexojs commented on August 23, 2024
hexo s error

from hexo-renderer-pandoc.

Comments (16)

sadofriod avatar sadofriod commented on August 23, 2024 1

补充一个手动安装pandoc最新版的方式(对于Ubuntu):

  • 卸载原本的sudo apt remove pandoc
  • 在任意目录下下载wget https://github.com/jgm/pandoc/releases/download/2.17.1.1/pandoc-2.17.1.1-1-amd64.deb
  • 手动安装sudo dpkg -i pandoc-2.17.1.1-1-amd64.deb

from hexo-renderer-pandoc.

Ritsuka314 avatar Ritsuka314 commented on August 23, 2024

from hexo-renderer-pandoc.

Broduker avatar Broduker commented on August 23, 2024

hi, could you check your pandoc version so i can reproduce your issue? also does using version above 2.0 fixes your issue?

---Original--- From: "Broduker"<[email protected]> Date: Mon, Nov 18, 2019 11:55 AM To: "wzpan/hexo-renderer-pandoc"<[email protected]>; Cc: "Subscribed"<[email protected]>; Subject: [wzpan/hexo-renderer-pandoc] hexo s error (#36) when use hexo s, something was wrong [ERROR][hexo-renderer-pandoc] pandoc exited with code 9: pandoc: Unknown extension: smart Some people on the Internet said that it may be related to Pandoc's smart parameter, which is in the node_modules\hexo-renderer-pandoc\index.js file. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

pandoc version pandoc-2.7.3-windows-x86_64

from hexo-renderer-pandoc.

Broduker avatar Broduker commented on August 23, 2024

发现作者是**人,那我就用中文仔细陈述一遍吧。
我就是按照步骤先从官网下载了pandoc-2.7.3-windows-x86_64,并进行了安装
然后按照说明卸载原有的渲染器 hexo-renderer-marked,并安装了hexo-renderer-pandoc

uninstall hexo-renderer-marked
install hexo-renderer-pandoc 

然后在 next/_config.yml 中将 mathjaxenable 值设为true

但是运行hexo s出现如上所述错误。上网查阅发现有人可能遇到了相似的问题,给出的解决办法为
node_modules\hexo-renderer-pandoc\index.js中的

var args = [ '-f', 'markdown-smart'+extensions, '-t', 'html-smart', math]

改成

var args = [ '-f', 'markdown'+extensions, '-t', 'html', math]

修改后确实没有报错,参考的文章Hexo 搭建个人博客指南

from hexo-renderer-pandoc.

Broduker avatar Broduker commented on August 23, 2024

hexo版本是4.0.0

from hexo-renderer-pandoc.

Ritsuka314 avatar Ritsuka314 commented on August 23, 2024

from hexo-renderer-pandoc.

Ritsuka314 avatar Ritsuka314 commented on August 23, 2024

from hexo-renderer-pandoc.

Ritsuka314 avatar Ritsuka314 commented on August 23, 2024

@Broduker 您好,我尝试使用以下命令

<...>\pandoc-2.7.3-windows-x86_64\pandoc.exe -f markdown-smart -t html-smart source\_posts\hello-world.md

渲染成功没有报错。

可否再次确认你使用的 pandoc 版本?尤其是你安装的版本是否是命令行中搜索到的那个?请于回复中附上运行命令 pandoc -v 的结果。另外也请附上 _config.yml 以及 package.json.

from hexo-renderer-pandoc.

Broduker avatar Broduker commented on August 23, 2024

哦,好像真是版本的问题,在git bash中查看版本的结果如下,跟我单独安装的版本确实不一样

$ pandoc -v
pandoc.exe 1.19.2.1
Compiled with pandoc-types 1.17.0.4, texmath 0.9, skylighting 0.1.1.4
Default user data directory: C:\Users\shens\AppData\Roaming\pandoc
Copyright (C) 2006-2016 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

这是我在安装hexo默认已经下载的吗,或者什么其他软件,之前确实没有单独下载过。那这样的话怎么替换这个版本呢

from hexo-renderer-pandoc.

Ritsuka314 avatar Ritsuka314 commented on August 23, 2024

from hexo-renderer-pandoc.

Broduker avatar Broduker commented on August 23, 2024

好的,我尝试改改

from hexo-renderer-pandoc.

Ritsuka314 avatar Ritsuka314 commented on August 23, 2024

from hexo-renderer-pandoc.

Broduker avatar Broduker commented on August 23, 2024

好的,多谢

from hexo-renderer-pandoc.

Ritsuka314 avatar Ritsuka314 commented on August 23, 2024

from hexo-renderer-pandoc.

Broduker avatar Broduker commented on August 23, 2024

ok

from hexo-renderer-pandoc.

Broduker avatar Broduker commented on August 23, 2024

找到了pandoc 1.19.2.1的来源,是anaconda3中集成的,卸载或升级包版本后问题解决,不过部分镜像源没有2.0以上版本,需要手动查找。
感谢答主,那我就把issue关了

from hexo-renderer-pandoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.