diff --git a/docs/browser.md b/docs/browser.md index f52d5c6b..421a9965 100644 --- a/docs/browser.md +++ b/docs/browser.md @@ -24,6 +24,9 @@ Download the latest version from [here](https://github.com/Khan/KaTeX/releases), copy `katex.js`, `katex.css`(or `katex.min.js` and `katex.min.css` to use minified versions) and `fonts` from `/katex`, and include like above. +You can also build from source. See [Building from Source](node.md#building-from-source) +for more details. + ## Bundler Use [`Node.js` package managers](node.md) to install KaTeX and require it in your project. Then bundle using bundlers like [webpack](https://webpack.js.org/) or diff --git a/docs/cli.md.template b/docs/cli.md.template index 41e9778e..66a973f7 100644 --- a/docs/cli.md.template +++ b/docs/cli.md.template @@ -14,7 +14,7 @@ npx katex > Above uses the `npx` command to run the locally installed executable. You can execute with the relative path: `./node_modules/.bin/katex` -> To use CLI from local clone, you need to build the project first by -running `npm run build` +> To use CLI from local clone, you need to build the project first. +See [Building from Source](node.md#building-from-source) for more details. ## Options diff --git a/docs/node.md b/docs/node.md index e1da1236..bfdefbde 100644 --- a/docs/node.md +++ b/docs/node.md @@ -19,5 +19,22 @@ yarn add katex # or globally yarn global add katex ``` + +## Building from Source + +To build you will need Git, Node.js 6.9 or later, and npm or Yarn. + +Clone a copy of the GitHub source repository: +```bash +git clone https://github.com/Khan/KaTeX.git +cd KaTeX +``` + +Then install dependencies and run `build` script: +```bash +npm install # or yarn install +npm run build # or yarn build +```
-> You can manually download the package from [here](https://github.com/Khan/KaTeX/releases) +> You can manually download the package and source code from +[GitHub releases](https://github.com/Khan/KaTeX/releases). diff --git a/docs/security.md b/docs/security.md index 7c79045e..1f9b0614 100644 --- a/docs/security.md +++ b/docs/security.md @@ -4,12 +4,17 @@ title: Security --- Any HTML generated by KaTeX *should* be safe from `