0.8.0 • Published 8 months ago

@schornio/markdown-util v0.8.0

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

@schornio/markdown-util

Opinionated markdown utilities. Also for next.js.

Installation

npm install @schornio/markdown-util

Usage

import { Markdown } from "@schornio/markdown-util";

export function MyComponent({ text }: { text: string }) {
  return <Markdown>{text}</Markdown>;
}

Usage with next.js

It uses next/image to render images and next/link to render links.

Optionally, you can pass headingTopLevel and imageHeight and imageWidth to the Markdown component.

import { Markdown } from "@schornio/markdown-util/next";

export function MyComponent({ text }: { text: string }) {
  return (
    <Markdown headingTopLevel={1} imageHeight={400} imageWidth={600}>
      {text}
    </Markdown>
  );
}

Publish new version

npm run build
npm version major, minor, patch
npm pack
npm publish --access public
0.8.0

8 months ago

0.7.0

8 months ago

0.6.1

8 months ago

0.6.0

8 months ago

0.5.0

8 months ago

0.4.0

8 months ago

0.3.0

8 months ago

0.2.0

8 months ago

0.1.0

8 months ago