Coder Social home page Coder Social logo

Comments (9)

chunchengwei avatar chunchengwei commented on May 18, 2024

我按这个安装后,执行hexo g时报错

41 ERROR Invalid or unexpected token in "/hexo/themes/hexo-theme-matery/layout/archive.ejs"
42 SyntaxError: Invalid or unexpected token in "/hexo/themes/hexo-theme-matery/layout/archive.ejs"
43 at new Function ()
44 at exports.compile (/hexo/node_modules/hexo-renderer-mathjax/node_modules/ejs/lib/ejs.js:242:14)
45 at Object.exports.render (/hexo/node_modules/hexo-renderer-mathjax/node_modules/ejs/lib/ejs.js:284:66)
46 at Hexo. (/hexo/node_modules/hexo-renderer-mathjax/index.js:14:24)
47 at Hexo.tryCatcher (/hexo/node_modules/bluebird/js/release/util.js:16:23)
48 at Hexo.ret (eval at makeNodePromisifiedEval (/usr/local/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promisify.js:184:12), :13:39)
49 at Promise.then.text (/hexo/node_modules/hexo/lib/hexo/render.js:61:21)
50 at tryCatcher (/hexo/node_modules/bluebird/js/release/util.js:16:23)
51 at Promise._settlePromiseFromHandler (/hexo/node_modules/bluebird/js/release/promise.js:512:31)
52 at Promise._settlePromise (/hexo/node_modules/bluebird/js/release/promise.js:569:18)
53 at Promise._settlePromiseCtx (/hexo/node_modules/bluebird/js/release/promise.js:606:10)
54 at _drainQueueStep (/hexo/node_modules/bluebird/js/release/async.js:142:12)
55 at _drainQueue (/hexo/node_modules/bluebird/js/release/async.js:131:9)
56 at Async._drainQueues (/hexo/node_modules/bluebird/js/release/async.js:147:5)
57 at Immediate.Async.drainQueues [as _onImmediate] (/hexo/node_modules/bluebird/js/release/async.js:17:14)
58 at runCallback (timers.js:705:18)
59 at tryOnImmediate (timers.js:676:5)
60 at processImmediate (timers.js:658:5)

from hexo-theme-matery.

blinkfox avatar blinkfox commented on May 18, 2024

@scutem @chunchengwei 你们参考下这篇文章中关于数学公式的解决方案试试,应该可以解决一些,数学公式这个主要是Hexo的Markdown解析器与MathJax有冲突引起的,没啥好的办法。

from hexo-theme-matery.

chunchengwei avatar chunchengwei commented on May 18, 2024

@blinkfox 辛苦辛苦,我看你刚更新了代码 说加入了 mathjax,可否把说明也更新一下,不知道是否需要把 hexo-renderer-marked 换成 hexo-renderer-kramed 。我最近按照别的模板 通过加mathjax.ejs的方法也支持了mathjax但由于把 hexo-renderer-marked 换成 hexo-renderer-kramed,同样遇到了代码不高亮的问题。

我参考的代码是:
https://github.com/litten/hexo-theme-yilia/blob/master/layout/_partial/mathjax.ejs

from hexo-theme-matery.

blinkfox avatar blinkfox commented on May 18, 2024

晚上回去更新吧,也还没有推到master里面,只是加了MathJax的支持,大部分情况下的数学公式是没问题的.如果公式里面有下划线_之类的,公司显示的就不一定对,因为两者的语法冲突只能通过引擎层面去解决了。

from hexo-theme-matery.

chunchengwei avatar chunchengwei commented on May 18, 2024

@blinkfox 已经pull下来了,很好用。

from hexo-theme-matery.

chunchengwei avatar chunchengwei commented on May 18, 2024

@blinkfox 显示markdown的table时出现问题,

错误可以参见这里,而且该文档没有开启mathjax:
Java笔记

这里有人讨论过这个:
支持latex加载table出现问题

不清楚该怎么弄

晚上回去更新吧,也还没有推到master里面,只是加了MathJax的支持,大部分情况下的数学公式是没问题的.如果公式里面有下划线_之类的,公司显示的就不一定对,因为两者的语法冲突只能通过引擎层面去解决了。

from hexo-theme-matery.

blinkfox avatar blinkfox commented on May 18, 2024

@chunchengweiMathJax没关系,没开启MathJax的话,页面就不会有MathJax相关的元素,因该是你的table写法有问题吧,为啥你下面那个table就没问题呢

from hexo-theme-matery.

chunchengwei avatar chunchengwei commented on May 18, 2024

@blinkfox 确实是我的问题,在哪里整个表格向右缩进了一下,我把缩进去掉就没问题了。但是这个在本地用typora打开是没问题的可以正常显示。但是这里不行。不过确实不是主题的问题。我使用其他的主题试了一下也是这样。

from hexo-theme-matery.

DBL2017 avatar DBL2017 commented on May 18, 2024

为了功能正常,我已经放弃代码高亮了

from hexo-theme-matery.

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.