@owomark/processor
v0.1.8
Published
Node-safe Markdown and MDX processor, plugins, and built-in MDX components for OwoMark.
Downloads
532
Maintainers
Readme
@owomark/processor
Node-safe Markdown and MDX processing for OwoMark. This package owns the static rendering pipeline, remark/rehype plugins, built-in MDX components, and MDX component CSS.
Install
npm install @owomark/processorIf you enable MDX evaluation, also install peer dependencies:
npm install @mdx-js/mdx react react-domUsage
import { createOwoMarkProcessor } from '@owomark/processor';
const processor = createOwoMarkProcessor({
mode: 'production',
enableMdx: true,
});
const html = await processor.process('# Hello');Import component styles separately:
import '@owomark/processor/mdx-components.css';To apply official light or dark token values, layer in theme CSS from @owomark/view:
import '@owomark/processor/mdx-components.css';
import '@owomark/view/light.css';