docusaurus
docusaurus copied to clipboard
docs: introduce KaTeX local copy plugin & Temml for math
Pre-flight checklist
- [x] I have read the Contributing Guidelines on pull requests.
- [x] ~~If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.~~ N/A
- [x] ~~If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.~~ N/A
Motivation
It is a pain in the neck to manage and copy all .woff2 files of KaTeX in your repository to host them in your server. My plugin https://npmjs.com/package/@tats-u/docusaurus-plugin-copy-katex-assets will be helpful and worth introduced.
Ideally, this kind of plugin should be managed by Docusaurus itself, not an outsider like me.
Also, Temml is better than KaTeX if you prefer extremely small download size or non Latin Modern Math fonts and also worth introduced.
https://www.npmjs.com/package/@daiji256/rehype-mathml can be used instead of rehype-katex to use Temml.
Test Plan
Test links
Deploy preview: https://deploy-preview-11115--docusaurus-2.netlify.app/docs/markdown-features/math-equations/#mathml
Backports:
https://deploy-preview-11115--docusaurus-2.netlify.app/docs/3.7.0/markdown-features/math-equations/#mathml https://deploy-preview-11115--docusaurus-2.netlify.app/docs/3.6.3/markdown-features/math-equations/#mathml
Related issues/PRs
https://github.com/facebook/docusaurus/discussions/11100
[V2]
Built without sensitive environment variables
| Name | Link |
|---|---|
| Latest commit | 9842f67a1dde065cc06f574fd0bdf8af9ef3ebc9 |
| Latest deploy log | https://app.netlify.com/sites/docusaurus-2/deploys/68050a1593a71f000811f5f3 |
| Deploy Preview | https://deploy-preview-11115--docusaurus-2.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
⚡️ Lighthouse report for the deploy preview of this PR
| URL | Performance | Accessibility | Best Practices | SEO | Report |
|---|---|---|---|---|---|
| / | 🟠 64 | 🟢 98 | 🟢 100 | 🟢 100 | Report |
| /docs/installation | 🟠 50 | 🟢 97 | 🟢 100 | 🟢 100 | Report |
| /docs/category/getting-started | 🟠 72 | 🟢 100 | 🟢 100 | 🟠 86 | Report |
| /blog | 🟠 60 | 🟢 96 | 🟢 100 | 🟠 86 | Report |
| /blog/preparing-your-site-for-docusaurus-v3 | 🔴 45 | 🟢 92 | 🟢 100 | 🟢 100 | Report |
| /blog/tags/release | 🟠 61 | 🟢 96 | 🟢 100 | 🟠 86 | Report |
| /blog/tags | 🟠 72 | 🟢 100 | 🟢 100 | 🟠 86 | Report |