This package provides a small React component that allows to render notebooks server-side with ReactDOMServer.renderToStaticMarkup()
. Markdown is parsed with marked
and maths are rendered with katex
. To support rendering math with katex
, you will need to include the katex.css stylesheet in your page.
$ yarn add @nteract/notebook-render
$ npm install --save @nteract/notebook-render
import NotebookRender from "@nteract/notebook-render";
export default () => {
const reactComponent = React.createElement(
NotebookRender,
{
notebook: notebook
},
null
);
const html = ReactDOMServer.renderToStaticMarkup(reactComponent);
return html;
};
We're working on adding more documentation for this component. Stay tuned by watching this repository!
If you experience an issue while using this package or have a feature request, please file an issue on the issue board.