Improve MathJax Performance and Accessibility in Documentation #82
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description:
The current MathJax integration in the Blender documentation, while functional, has opportunities for improvement in terms of performance, accessibility, and maintainability.
Here's a breakdown of the key areas:
These issues could lead to a less-than-ideal user experience for those who rely on the Blender documentation.
Solution:
This PR addresses these areas with the following changes:
Performance:
Accessibility:
Configuration:
Create mathjax-config.js: Move configuration options to a dedicated file:
Error Handling:
Use MathJax's error API: Provide user-friendly error messages:
Thanks for the contribution. Our MathJax integration follows the Material for MkDocs documentation with minimal changes to reduce maintenance burden. If there are improvements to be made, they should be submitted to them to evaluate, we can then follow their decisions.
As for the proposed changes:
Lastly this appears to be a AI generated list of improvements. I'd consider it good practice to indicate this, so reviewers are aware that the suggestions may not actually be applicable to their specific case (AI generated improvements are very general and lack context).
I apologize if my initial suggestions were too general and didn't fully consider the Blender's documentation and its reliance on Material for MkDocs. You are right that for occasional, simple math expressions and a statically generated site!
In the future, I will clearly indicate if and how AI tools were used in my suggestions to ensure transparency.
And I'll suggest the error handling improvement, as having clearer error messages can be helpful for maintainers and potentially users.
Added errorHandler
this new window.MathJax will help maintainers in for easier debugging.
If the proposed changes is not important then it's okay, I appreciate you're point on the importance of maintaining consistency with Material for MkDocs, yes as it minimizes maintenance overhead.
Thanks again for your time and consideration of my suggestions!