npm.io
0.1.9 • Published 5d ago

@owomark/processor

Licence
MIT
Version
0.1.9
Deps
13
Size
385 kB
Vulns
0
Weekly
0

@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/processor

If you enable MDX evaluation, also install peer dependencies:

npm install @mdx-js/mdx react react-dom

Usage

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';

Keywords