mirror of
https://github.com/discourse/discourse-math.git
synced 2025-02-16 16:34:56 +00:00
FEATURE: Update KaTeX renderer to v0.11.1 (#18)
Mostly bug fixes and couple new features. This version is now live on khanacademy.org
This commit is contained in:
parent
586c283506
commit
03ec5c0443
32
public/katex/README.md
Normal file
32
public/katex/README.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
|
||||||
|
## How to build KaTeX for Discourse
|
||||||
|
|
||||||
|
1. `git clone https://github.com/KaTeX/KaTeX.git && cd KaTeX`
|
||||||
|
|
||||||
|
`git submodule update --init --recursive`
|
||||||
|
|
||||||
|
2. Disable TTF fonts:
|
||||||
|
|
||||||
|
`export USE_TTF=false`
|
||||||
|
|
||||||
|
3. Run build to fetch the fonts into `dist/fonts/`
|
||||||
|
|
||||||
|
`npm run build`
|
||||||
|
|
||||||
|
4. Copy fonts to this plugin
|
||||||
|
|
||||||
|
`cp dist/fonts/* discourse-math/public/katex/fonts/`
|
||||||
|
|
||||||
|
5. Change paths to fonts ((otherwise the fonts won't load in Discourse):
|
||||||
|
|
||||||
|
`sed -ri 's/@font-folder.+$/@font-folder:
|
||||||
|
"\/plugins\/discourse-math\/katex\/fonts";/'
|
||||||
|
submodules/katex-fonts/fonts.less`
|
||||||
|
|
||||||
|
3. Build KaTeX:
|
||||||
|
|
||||||
|
`yarn && yarn builld`
|
||||||
|
|
||||||
|
4. Copy `katex.min.js` and `katex.min.css` from `dist/` to
|
||||||
|
`discourse-math/public/katex/`
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2
public/katex/katex.min.css
vendored
2
public/katex/katex.min.css
vendored
File diff suppressed because one or more lines are too long
2
public/katex/katex.min.js
vendored
2
public/katex/katex.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user