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

Fetch KaTeX and MathJax from UNPKG #6937

Merged
merged 1 commit into from
May 5, 2024

Conversation

vedranmiletic
Copy link
Contributor

@vedranmiletic vedranmiletic commented Mar 19, 2024

This is consistent with how we fetch Mermaid.js and automatically picks the latest minor version.

@vedranmiletic
Copy link
Contributor Author

Never mind, minified version on jsDelivr is unfortunately broken.

@vedranmiletic
Copy link
Contributor Author

I found a way to fix this.

@vedranmiletic
Copy link
Contributor Author

FWIW, I tested it in deployment as well, e.g. you can see it live on this page with a formula.

@squidfunk
Copy link
Owner

What's the upside? Why is jsdeliver better than Cloudflare?

@vedranmiletic
Copy link
Contributor Author

For me, I like that it automatically picks the latest minor version, no need to modify the config every time KaTeX puts out a new minor (or patch) release.

@squidfunk
Copy link
Owner

squidfunk commented May 4, 2024

Thanks for the explanation. I'd say we switch to unpkg then – same result:

https://www.unpkg.com/katex@0/dist/katex.min.js

Would you like to adjust the PR?

@vedranmiletic
Copy link
Contributor Author

Gladly. Would you mind if I switch MathJax from jsDelivr to unpkg at the same time?

@squidfunk
Copy link
Owner

We should switch everything to unpkg if possible ✌️

This is consistent with how we fetch Mermaid.js and automatically picks
the latest minor version.
@vedranmiletic vedranmiletic changed the title Fetch KaTeX from jsDelivr Fetch KaTeX and MathJax from UNPKG May 5, 2024
@vedranmiletic
Copy link
Contributor Author

Done and done. 😎

@squidfunk
Copy link
Owner

Alright, let's go!

@squidfunk squidfunk merged commit 0de8be2 into squidfunk:master May 5, 2024
4 checks passed
@vedranmiletic
Copy link
Contributor Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants