-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix #553 New Feature: mhchem support #554
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ cache: | |
# And if you want to place your icons in `hexo-site/source/` root directory, you must remove `/images` prefix from pathes. | ||
|
||
# For example, you put your favicons into `hexo-site/source/images` directory. | ||
# Then need to rename & redefine they on any other names, otherwise icons from Next will rewrite your custom icons in Hexo. | ||
# Then need to rename & redefine them on any other names, otherwise icons from Next will rewrite your custom icons in Hexo. | ||
favicon: | ||
small: /images/favicon-16x16-next.png | ||
medium: /images/favicon-32x32-next.png | ||
|
@@ -64,15 +64,15 @@ footer: | |
|
||
# Icon between year and copyright info. | ||
icon: | ||
# Icon name in fontawesome, see: https://fontawesome.com/v4.7.0/icons | ||
# Icon name in fontawesome, see: https://fontawesome.com/v4.7.0/icons/ | ||
# `heart` is recommended with animation in red (#ff0000). | ||
name: user | ||
# If you want to animate the icon, set it to true. | ||
animated: false | ||
# Change the color of icon, using Hex Code. | ||
color: "#808080" | ||
|
||
# If not defined, will be used `author` from Hexo main config. | ||
# If not defined, `author` from Hexo main config will be used. | ||
copyright: | ||
# ------------------------------------------------------------- | ||
powered: | ||
|
@@ -99,7 +99,7 @@ footer: | |
|
||
# Creative Commons 4.0 International License. | ||
# https://creativecommons.org/share-your-work/licensing-types-examples | ||
# Available: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | zero | ||
# Available values: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | zero | ||
creative_commons: | ||
license: by-nc-sa | ||
sidebar: false | ||
|
@@ -135,7 +135,7 @@ exturl: false | |
# Key is the name of menu item. If translate for this menu will find in languages - this translate will be loaded; if not - Key name will be used. Key is case-senstive. | ||
# Value before `||` delimeter is the target link. | ||
# Value after `||` delimeter is the name of FontAwesome icon. If icon (with or without delimeter) is not specified, question icon will be loaded. | ||
# External url should start with http:// or https:// . | ||
# External url should start with http:// or https:// | ||
menu: | ||
home: / || home | ||
#about: /about/ || user | ||
|
@@ -170,7 +170,7 @@ scheme: Muse | |
# Posts / Categories / Tags in sidebar. | ||
site_state: true | ||
|
||
# Social Links. | ||
# Social Links | ||
# Usage: `Key: permalink || icon` | ||
# Key is the link label showing to end users. | ||
# Value before `||` delimeter is the target permalink. | ||
|
@@ -231,7 +231,7 @@ toc: | |
max_depth: 6 | ||
|
||
sidebar: | ||
# Sidebar Position, available value: left | right (only for Pisces | Gemini). | ||
# Sidebar Position, available values: left | right (only for Pisces | Gemini). | ||
position: left | ||
#position: right | ||
|
||
|
@@ -241,7 +241,7 @@ sidebar: | |
# Pisces | Gemini: 240 | ||
#width: 300 | ||
|
||
# Sidebar Display, available value (only for Muse | Mist): | ||
# Sidebar Display, available values (only for Muse | Mist): | ||
# - post expand on posts automatically. Default. | ||
# - always expand for all pages automatically | ||
# - hide expand only when click on the sidebar toggle icon. | ||
|
@@ -365,7 +365,7 @@ mobile_layout_economy: false | |
# Android Chrome header panel color ($brand-bg / $headband-bg => $black-deep). | ||
android_chrome_color: "#222" | ||
|
||
# Custom Logo. | ||
# Custom Logo | ||
# Do not support Scheme Mist currently. | ||
# Options: | ||
# enabled: If true, will enable custom logo | ||
|
@@ -459,11 +459,13 @@ math: | |
mathjax: | ||
# Use 2.7.1 as default, jsdelivr as default CDN, works everywhere even in China | ||
cdn: //cdn.jsdelivr.net/npm/mathjax@2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML | ||
# 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). | ||
# 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 | ||
|
||
# See: https://mhchem.github.io/MathJax-mhchem/ | ||
#mhchem: //cdn.jsdelivr.net/npm/mathjax-mhchem@3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And maybe this link wrong too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have tested it, mathjax will load |
||
#mhchem: //cdnjs.cloudflare.com/ajax/libs/mathjax-mhchem/3.3.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, this link not working. (403) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mathjax will request |
||
|
||
# hexo-renderer-markdown-it-plus (or hexo-renderer-markdown-it with markdown-it-katex plugin) needed to full Katex support. | ||
katex: | ||
# Use 0.7.1 as default, jsdelivr as default CDN, works everywhere even in China | ||
|
@@ -547,7 +549,7 @@ valine: | |
#livere_uid: your uid | ||
|
||
# Gitment | ||
# Introduction: https://imsun.net/posts/gitment-introduction | ||
# Introduction: https://github.com/imsun/gitment | ||
gitment: | ||
enable: false | ||
mint: true # RECOMMEND, A mint on Gitment, to support count, language and proxy_gateway | ||
|
@@ -575,7 +577,7 @@ gitalk: | |
distraction_free_mode: true # Facebook-like distraction free mode | ||
|
||
# Baidu Share | ||
# Available value: | ||
# Available values: | ||
# button | slide | ||
# Warning: Baidu Share does not support https. | ||
#baidushare: | ||
|
@@ -586,8 +588,7 @@ gitalk: | |
|
||
# NeedMoreShare2 | ||
# Dependencies: https://github.com/theme-next/theme-next-needmoreshare2 | ||
# See: https://github.com/revir/need-more-share2 | ||
# Also see: https://github.com/DzmVasileusky/needShareButton | ||
# See: https://github.com/revir/need-more-share2, https://github.com/DzmVasileusky/needShareButton | ||
# iconStyle: default | box | ||
# boxForm: horizontal | vertical | ||
# position: top / middle / bottom + Left / Center / Right | ||
|
@@ -772,6 +773,7 @@ bookmark: | |
# Tags Settings | ||
# --------------------------------------------------------------- | ||
|
||
# See: https://theme-next.org/docs/tag-plugins/ | ||
# Note tag (bs-callout) | ||
note: | ||
# Note tag style values: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,29 @@ | ||
<script type="text/x-mathjax-config"> | ||
{% if theme.math.mathjax.mhchem %} | ||
MathJax.Ajax.config.path['mhchem'] = '{{ theme.math.mathjax.mhchem }}'; | ||
{% endif %} | ||
|
||
MathJax.Hub.Config({ | ||
tex2jax: { | ||
inlineMath: [ ['$','$'], ["\\(","\\)"] ], | ||
inlineMath: [ ['$','$'], ["\\(","\\)"] ], | ||
processEscapes: true, | ||
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'] | ||
}, | ||
TeX: {equationNumbers: { autoNumber: "AMS" }} | ||
TeX: { | ||
{% if theme.math.mathjax.mhchem %} | ||
extensions: ['[mhchem]/mhchem.js'], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, i see. Maybe try to add in CDN's settings something like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems that mathjax can't parse There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mb because |
||
{% endif %} | ||
equationNumbers: { | ||
autoNumber: "AMS" | ||
} | ||
} | ||
}); | ||
</script> | ||
|
||
<script type="text/x-mathjax-config"> | ||
MathJax.Hub.Queue(function() { | ||
var all = MathJax.Hub.getAllJax(), i; | ||
for (i=0; i < all.length; i += 1) { | ||
for (i = 0; i < all.length; i += 1) { | ||
all[i].SourceElement().parentNode.className += ' has-jax'; | ||
} | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check this link – it's worked for now, i think no need to remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML
just make a redirect tohttps://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js
, and you can seeconsole.warn('WARNING: cdn.mathjax.org has been retired. Check https://www.mathjax.org/cdn-shutting-down/ for migration tips.')
in the script.I suggest removing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, remove it. Under your responsibility. =)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=)