Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持latex加载table出现问题 #138

Closed
Mr-Linus opened this issue Jul 16, 2018 · 10 comments
Closed

支持latex加载table出现问题 #138

Mr-Linus opened this issue Jul 16, 2018 · 10 comments
Labels

Comments

@Mr-Linus
Copy link

Mr-Linus commented Jul 16, 2018

我clone的最新的archer,发现表格显示有问题,看了下网页代码的确渲染成了table https://note.geekfan.top/2018/07/17/test/

我发现这个可能问题并不仅仅是theme导致的,如果让hexo支持latex,必须安装hexo-renderer-kramed ,这个bug不仅仅是我一个人出现 sun11/hexo-renderer-kramed#2 请教 @fi3ework 有什么更可靠的方法去避免这个问题吗

@fi3ework
Copy link
Owner

原来是 kramed 在 table 外面多套了一层 DOM 导致样式出错了,因为我本人没写过 Latex 所以一直没发现。已修复,感谢反馈。

@fi3ework fi3ework added the bug label Jul 17, 2018
@fi3ework
Copy link
Owner

好像 @secsilm 也遇到过这个问题,已经解决了 😂

@Mr-Linus
Copy link
Author

Mr-Linus commented Jul 17, 2018

感谢@fi3ework ,我昨晚也补充了问了下sun11/hexo-renderer-kramed#2,作者也是今天回复然后close,非常感谢你们

@Mr-Linus
Copy link
Author

Mr-Linus commented Jul 17, 2018

@fi3ework 重新hexo clean && hexo g的时候报了一个错

INFO  Start processing
ERROR /Users/funky/Projects/Blog/themes/archer/layout/layout.ejs:3
    1| <!DOCTYPE html>
    2| <html>
 >> 3|     <%- partial('_partial/base-head') %>
    4|     <% if (is_home()) { %>
    5|         <body class="home-body">
    6|     <% } else if(is_post()){ %>

Invalid or unexpected token in /Users/funky/Projects/Blog/themes/archer/layout/_partial/base-head.ejs while compiling ejs

If the above error is not helpful, you may want to try EJS-Lint:
https://github.com/RyanZim/EJS-Lint
Or, if you meant to create an async function, pass async: true as an option.
SyntaxError: /Users/funky/Projects/Blog/themes/archer/layout/layout.ejs:3
    1| <!DOCTYPE html>
    2| <html>
 >> 3|     <%- partial('_partial/base-head') %>
    4|     <% if (is_home()) { %>
    5|         <body class="home-body">
    6|     <% } else if(is_post()){ %>

Invalid or unexpected token in /Users/funky/Projects/Blog/themes/archer/layout/_partial/base-head.ejs while compiling ejs

If the above error is not helpful, you may want to try EJS-Lint:
https://github.com/RyanZim/EJS-Lint
Or, if you meant to create an async function, pass async: true as an option.
    at new Function (<anonymous>)
    at Template.compile (/Users/funky/Projects/Blog/node_modules/ejs/lib/ejs.js:618:12)
    at Object.compile (/Users/funky/Projects/Blog/node_modules/ejs/lib/ejs.js:389:16)
    at handleCache (/Users/funky/Projects/Blog/node_modules/ejs/lib/ejs.js:212:18)
    at Object.exports.render (/Users/funky/Projects/Blog/node_modules/ejs/lib/ejs.js:416:10)
    at Hexo.ejsRenderer (/Users/funky/Projects/Blog/node_modules/hexo-renderer-ejs/lib/renderer.js:7:14)
    at Render.renderSync (/Users/funky/Projects/Blog/node_modules/hexo/lib/hexo/render.js:97:23)
    at Theme._View.View._compiledSync.locals [as _compiledSync] (/Users/funky/Projects/Blog/node_modules/hexo/lib/theme/view.js:127:43)
    at Theme._View.View.View.renderSync (/Users/funky/Projects/Blog/node_modules/hexo/lib/theme/view.js:48:23)
    at Object.partial (/Users/funky/Projects/Blog/node_modules/hexo/lib/plugins/helper/partial.js:39:15)
    at Object.wrapper [as partial] (/Users/funky/Projects/Blog/node_modules/lodash/lodash.js:4949:19)
    at eval (eval at exports.compile (/Users/funky/Projects/Blog/node_modules/hexo-renderer-mathjax/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:30:64)
    at eval (eval at exports.compile (/Users/funky/Projects/Blog/node_modules/hexo-renderer-mathjax/node_modules/ejs/lib/ejs.js:242:14), <anonymous>:30:4585)
    at /Users/funky/Projects/Blog/node_modules/hexo-renderer-mathjax/node_modules/ejs/lib/ejs.js:255:15
    at Object.exports.render (/Users/funky/Projects/Blog/node_modules/hexo-renderer-mathjax/node_modules/ejs/lib/ejs.js:293:13)
    at Hexo.<anonymous> (/Users/funky/Projects/Blog/node_modules/hexo-renderer-mathjax/index.js:14:24)
    at Hexo.tryCatcher (/Users/funky/Projects/Blog/node_modules/bluebird/js/release/util.js:16:23)
    at Hexo.ret (eval at makeNodePromisifiedEval (/usr/local/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promisify.js:184:12), <anonymous>:13:39)
    at Promise.then.text (/Users/funky/Projects/Blog/node_modules/hexo/lib/hexo/render.js:61:21)
    at tryCatcher (/Users/funky/Projects/Blog/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/funky/Projects/Blog/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/Users/funky/Projects/Blog/node_modules/bluebird/js/release/promise.js:569:18)
ERROR /Users/funky/Projects/Blog/themes/archer/layout/layout.ejs:3
    1| <!DOCTYPE html>
    2| <html>
 >> 3|     <%- partial('_partial/base-head') %>
    4|     <% if (is_home()) { %>
    5|         <body class="home-body">
    6|     <% } else if(is_post()){ %>

Invalid or unexpected token in /Users/funky/Projects/Blog/themes/archer/layout/_partial/base-head.ejs while compiling ejs

If the above error is not helpful, you may want to try EJS-Lint:
https://github.com/RyanZim/EJS-Lint
Or, if you meant to create an async function, pass async: true as an option.
SyntaxError: /Users/funky/Projects/Blog/themes/archer/layout/layout.ejs:3
    1| <!DOCTYPE html>
    2| <html>
 >> 3|     <%- partial('_partial/base-head') %>
    4|     <% if (is_home()) { %>
    5|         <body class="home-body">
    6|     <% } else if(is_post()){ %>

Invalid or unexpected token in /Users/funky/Projects/Blog/themes/archer/layout/_partial/base-head.ejs while compiling ejs

@fi3ework
Copy link
Owner

@Mr-Linus 可以了,少写了个引号... 感谢提醒

@Mr-Linus
Copy link
Author

Ok,我再试试

@Mr-Linus
Copy link
Author

@fi3ework 表格显示没问题了但是代码框了一圈白框....
https://note.geekfan.top/2017/12/12/Binary-tree/

@fi3ework
Copy link
Owner

再试一下吧,这次大概是真的没问题了

@Mr-Linus
Copy link
Author

@fi3ework 嗯,没啥大问题了,感谢 👍

@secsilm
Copy link
Contributor

secsilm commented Jul 17, 2018

没想到这个问题半年后解决了 😆 ,点个赞 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants