Open tefkah opened 3 years ago
Sorry about the lack of documentation, I am working on them right now. But I just tried on top of the next
example. You don't have to tweak the next plugin for this. You just add it in the next.config.js
file, like so:
const latex = require('@orgajs/rehype-latex').default
const withOrga = require('@orgajs/next').default({
// other configs ...
rehypePlugins: [ latex ],
})
Remember to add the style in your layout component, or directly in the _app.tsx
. Something similar to this:
<>
<Head> // 👈 this is next/head
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/katex@0.13.18/dist/katex.min.css"
integrity="sha384-zTROYFVGOfTw7JV7KUu8udsvW2fx4lWOsCEDqhBreBwlHI4ioVRtmIvEThzJHGET"
crossOrigin="anonymous"
/>
</Head>
...
</>
Let me know if it works on your project, I just tried it in the monorepo, not a standalone repo, there might be some issues.
Hi! I saw you recently added LaTeX support, which is awesome! However, I saw that it was not yet integrated with the Next plugin. I tried my hand at it myself a bit, but couldn't get it to work with the react loader for some reason.
What i tried
And some other things, such as adding
@orgajs/rehype-latex
to the package.json.Building the project and then trying to run the Next starter yields this error.
Let me know if I can do anything more to help!