florence-social / mastodon-fork

Florence's fork of Mastodon
GNU Affero General Public License v3.0
138 stars 15 forks source link

KaTeX support #162

Open clarfonthey opened 4 years ago

clarfonthey commented 4 years ago

Right now, a lot of people seem to use MathJax via this patch: https://gist.github.com/christianp/222cebfa0a3c9d0062f793e98ef4e6ad

It would make sense to use KaTeX instead, which usually has a much lower impact on performance. Longer-term, we might even want to render on the server side, e.g. if kotlitex ever takes off.

This would have to be a toggled setting, as it has a nontrivial effect on performance. Additionally, it should be able to be disabled when posting.

clarfonthey commented 4 years ago

Actually, this may be a faster alternative: https://github.com/glebm/katex-ruby

Will have to look into it later. Would likely require a lot of benchmarking.