2.0.2 • Published 9 months ago

@schornio/markdown-util v2.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
9 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
1.0.1

11 months ago

1.0.0

11 months ago

2.0.2

9 months ago

2.0.1

9 months ago

2.0.0

9 months ago

0.8.0

2 years ago

0.7.0

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago