Comments (19)
As i see u suggest 3rd variant to solve this problem, right?
And u write:
but i don't known how to merge the code in layout/_third-party/mathjax.swig, just a suggestion
So, the simplest way to modify any part of main repo code is:
- Do fork of main repo to your remote (and local, but not necessary) repo.
- U do any changes in your forked repo, this changes can be made in Github web-interface directly.
- After all changes, u create pull request from your remote changed repo to main repo. There will be button named «Pull request» in mainpage of your forked repo:
Try it.
from hexo-theme-next.
no... i understand how to pull request, but i don't known how to debug in layout/_third-party/mathjax.swig
.
just know how to solve it in next/source/js/custom.js
.
from hexo-theme-next.
So, can u step by step write how and where you do changes? And i'll try to do this.
from hexo-theme-next.
i will do my best...I'm just a layman in JS.
from hexo-theme-next.
Ok, can u give the path to next/source/js/custom.js
file?
from hexo-theme-next.
mathjax: enable: true
in the theme's_config.yml
,npm uninstall hexo-renderer-marked --save
npm install hexo-renderer-pandoc --save
- Remove
the if(config.template) args.push("--template=" + config.template);
inhexo\node_modules\hexo-renderer-pandoc\index.js
, - add mathjax in
/themes/next/source/js/custom.js
:
//MathJax
window.MathJax = {
AuthorInit: function () {
MathJax.Hub.Register.StartupHook("Begin",function () {
MathJax.Hub.Queue(function() {
var all = MathJax.Hub.getAllJax(), i;
for (i=0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';
}
});
});
}
};
window.MathJax = {
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
}
};
// <script type="text/javascript" src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
// jQuery
$.getScript('https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML', function()
{
// script is now loaded and executed.
// put your dependent JS here.
});
- add
<script type="text/javascript" src="/js/custom.js"></script>
in front of/body
inthemes/next/layout/_layout.swig
:
from hexo-theme-next.
Ok, i see now. I just not understand what is index.js
and custom.js
. Awaiting for new branch.
from hexo-theme-next.
i still have no clue and have given up trying it...
haha
from hexo-theme-next.
Please, try to change in NexT config (latest commit on this changes here):
# MathJax Support
mathjax:
enable: false
per_page: false
- cdn: //cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML
+ cdn: //cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML
And of course disable custom.js
in _layout.swig
.
Still need modify mathjax.swig
?
@sli1989 if issue still exists, please:
- Make screens with valid and invalid looked formula.
- Give this formula in codeblock to explain how i can to paste it to
*.md
.
If u want see bugfix, i at least must to reproce it. But i don't understand this math things.
from hexo-theme-next.
it works, thank u.
# MathJax Support
mathjax:
enable: true
per_page: false
cdn: //cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML
from hexo-theme-next.
@sli1989 really? Works in 2 variant suggested by u, right?
from hexo-theme-next.
yes, testing in NexT.Muse v6.0.0, there is no need to modify the next/source/js/custom.js
and mathjax.swig
.
just set the mathjax in the theme's _config.yml
.
from hexo-theme-next.
So, this issue is solved?
from hexo-theme-next.
yes, it's done. thank u.
from hexo-theme-next.
Links on MathJax CDN in config was updated: (be3528f)
# MathJax Support
mathjax:
enable: false
per_page: false
# For newMathJax CDN (cdnjs.cloudflare.com) with fallback to oldMathJax (cdn.mathjax.org).
cdn: //cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML
# For direct link to MathJax.js with CloudFlare CDN (cdnjs.cloudflare.com).
#cdn: //cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML
# For automatic detect latest varsion link to MathJax.js and get from CloudFlare.
#cdn: //cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML
from hexo-theme-next.
😲, suggest to use cdn: //cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML
as default,
The MathJax CDN hosted at cdn.mathjax.org will be shutting down on April 30, 2017.
from hexo-theme-next.
I suggest:
- Add
//cdn.rawgit.com/mathjax/MathJax/2.7.1/MathJax.js
as written in docs above. - Add local copy of MathJax as 3rd-party
lib
extension. For that need to add separated repo.
from hexo-theme-next.
it's not working with //cdn.rawgit.com/mathjax/MathJax/2.7.1/MathJax.js
.
cdn: //cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML
is ok.
from hexo-theme-next.
Ok. Well, need to add local libs with separated repos. I'll do it later, after 6.0.1 release, i think.
from hexo-theme-next.
Related Issues (20)
- 无法设置自动折叠帖子 HOT 5
- click tags btn but get 404 page HOT 1
- Archive page cannot be rendered and displayed normally. HOT 1
- NexT note with customize link color HOT 1
- 如何添加博客分享功能? HOT 2
- <tr> tag with class="header" displayed incorrectly HOT 1
- 如何更换自定义字体 HOT 1
- ~/source/_data/footer.swig can't work as well HOT 1
- 能不能在主题中增加一个按标签进行分类,在搜索框前面增加选择标签的下拉框,进而实现分类搜索的功能?? HOT 1
- 移动端国内访问博客只显示框架,不显示文字 HOT 2
- 使用utteranc作为评论系统, 点击github注册按钮后, 总是返回到http://example.com/... 然后页面找不到 HOT 2
- 自定义:添加代码块折叠
- 空格宽度不一样 HOT 2
- 能否支持配置备案跳转地址 HOT 1
- Gitter集成问题 HOT 1
- insert a inline image in text, but the image and text are not aligned horizontally HOT 1
- next 主题如何设置首页为Archives HOT 1
- 有中文说明的config.yml吗? HOT 1
- 将官网链接替换为 theme-next.js.org HOT 2
- 關於中文段首空格與豎排的支持諮詢。 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hexo-theme-next.