Skip to content

Commit d25a617

Browse files
committed
Add docs for equations
1 parent 0b9eeb2 commit d25a617

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
- `NotionRenderer`: [`docs/`](https://github.com/janniks/vue-notion/tree/main/docs#notionrenderer)
44
- Syntax-Highlighting in Code Blocks (with Prism.js): [`docs/`](https://github.com/janniks/vue-notion/tree/main/docs#syntax-highlighting)
5+
- Equations: [`docs/`](https://github.com/janniks/vue-notion/tree/main/docs#equations)
56
- Notion API: [`docs/`](https://github.com/janniks/vue-notion/tree/main/docs#notion-api)
67
- Nuxt: [`docs/`](https://github.com/janniks/vue-notion/tree/main/docs#nuxtjs--server-side-rendering--static-site-generation)
78

@@ -110,6 +111,27 @@ import "prismjs/themes/prism.css";
110111
> ⚠️ To keep file size down, Prism.js only includes `markup`, `css`, `clike`, and `javascript` languages per default.
111112
> To add supported languages import the language component from Prism.js – e.g. `import 'prismjs/components/prism-rust'` for `rust`.
112113
114+
## Equations
115+
116+
The following steps are required to display equations via katex
117+
118+
- Install `vue-katex` to your project – `npm install vue-katex`
119+
- Import the katex css in your project
120+
121+
```js
122+
import "katex/dist/katex.min.css";
123+
```
124+
125+
- Install the Vue plugin globally
126+
127+
```js
128+
import Vue from "vue";
129+
import VueKatex from "vue-katex";
130+
Vue.use(VueKatex);
131+
```
132+
133+
> For usage with Nuxt, look at the `/example` (`plugins` in `nuxt.config.js`, `plugins/vue-katex.js`)
134+
113135
## Notion API
114136

115137
The official Notion API is currently in [private beta](https://www.notion.so/api-beta).

0 commit comments

Comments
 (0)