fi3ework / hexo-theme-archer

🎯 A smart and modern theme for Hexo.
https://fi3ework.github.io/hexo-theme-archer
MIT License
1.53k stars 275 forks source link

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

Closed Mr-Linus closed 6 years ago

Mr-Linus commented 6 years ago

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

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

fi3ework commented 6 years ago

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

fi3ework commented 6 years ago

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

Mr-Linus commented 6 years ago

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

Mr-Linus commented 6 years ago

@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 commented 6 years ago

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

Mr-Linus commented 6 years ago

Ok,我再试试

Mr-Linus commented 6 years ago

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

fi3ework commented 6 years ago

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

Mr-Linus commented 6 years ago

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

secsilm commented 6 years ago

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