-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Not load mathjax per page #257
Comments
U suggest not load MJ per page by default? Lines 423 to 430 in 1e8670b
@wafer-li, guys, any comments about it? |
We had discussed before.
|
So, maybe need to rename |
I think it can be done just reverting some logic, but may result in breaking change (can't be compatible). |
It's will be breaking change if we change here anything. So, to prevent confuse users rename this option on more comfortable value will be best. |
sorry, my next version is a little old, not have this comment , Default(true) will load mathjax/katex script on demand so i think per_page is meaning load every page , so i set this false, |
a bug for me (when I switch to use the theme from (I am a newbie, just ignore me if this makes no sense) If I set |
I think rename |
@StoneMa Ah, I get the meaning of per_page, thanks! To avoid the legacy users, alternatively, you may clarify it in the comments. For example, “when per page is set to true, you need to use mathjax:true in each md to enable mathjax.” Something like this. FYI. |
It already had such comments. Excuse me. I will just upgrade my next. |
Maybe we can set default value as per_page: false |
Just my opinion. It's better if the post file is independent from the theme, or, every time we changes the theme, we need to modify the post file too. So, is there a mechanism that can detect equation expressions in the post file? Can it be implemented in NexT not Hexo? |
I think about this too with other guys and for now we can't find something like ready-to-work math autodetection. And actually, this can be implement via internal JS libraries in NexT, but here may be a little trouble: nobody knows, on how much lower will be the speed of content generation then. But idea is nice, thank's for opinion, @panqiincs.
Lines 449 to 455 in 6051571
Lines 479 to 485 in 6051571
But later we will back to this question again... |
So, is there any good way to judge whether there is a math formula in the page? |
Need to ask someone who often work math. @sli1989? |
yeah, I talked about this last year, and I prefer to change the logic too. |
Two different solutions:
|
My opinion is to keep it as is. Regular expressions are not always accurate (depending on the renderer). Update: see also next-theme/hexo-filter-mathjax#18 Option renamed in next-theme/hexo-theme-next@a3dcac5 |
hexo-theme-next/layout/_third-party/math/index.swig
Line 13 in 1e8670b
i think this line should be
{% if theme.math.per_page or (is_index_has_math or page.mathjax) %}
The text was updated successfully, but these errors were encountered: