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

Fix #78 #81

Merged
merged 2 commits into from
Jan 23, 2018
Merged

Fix #78 #81

merged 2 commits into from
Jan 23, 2018

Conversation

wafer-li
Copy link
Member

Only load math script in homepage whose posts contain mathjax: true
and the page with mathjax: true

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines.
  • Tests for the changes have been added (for bug fixes / features).
    • Muse | Mist have been tested.
    • Pisces | Gemini have been tested.
  • Docs have been added / updated (for bug fixes / features).

PR Type

What kind of change does this PR introduce?

  • Bugfix.
  • Feature.
  • Code style update (formatting, local variables).
  • Refactoring (no functional changes, no api changes).
  • Build related changes.
  • CI related changes.
  • Documentation content changes.
  • Other... Please describe:

What is the current behavior?

Math script will be loaded in tags and achives pages with no mathjax: true

Issue Number(s): #78

What is the new behavior?

Math script will only be loaded in two situations:

  1. The current page contains a front matter mathjax: true

  2. The current page is homepage and it has a least one post which contains the mathjax: true front matter

  • Screens with this changes:

Homepage with no post contains mathjax: true:
image

Homepage with post contains mathjax: true:
image

Post with no mathjax: true:
image

Post with mathjax: true:
image

  • Link to demo site with this changes: N/A

How to use?

In NexT _config.yml:

No changes of config file.

Does this PR introduce a breaking change?

  • Yes.
  • No.

Only load math script in homepage whose posts contain `mathjax: true`
and the page with `mathjax: true`
@wafer-li
Copy link
Member Author

wafer-li commented Jan 23, 2018

@tsanie Mist all right?

@wafer-li wafer-li merged commit 2a69cf1 into master Jan 23, 2018
@wafer-li wafer-li added this to the v6.0.3 milestone Jan 23, 2018
@wafer-li wafer-li deleted the fix-math-load branch January 23, 2018 13:50
@tsanie
Copy link
Contributor

tsanie commented Jan 23, 2018

seems no problem.

tongluyang pushed a commit to tongluyang/hexo-theme-next that referenced this pull request Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants