@rdub/next-markdown
v0.3.0
Published
Markdown utilities for Next.js
Downloads
24
Readme
@rdub/next-markdown
Markdown utilities for Next.js
import Markdown, { MD } from '@rdub/next-markdown/md'
export default function Page() {
return <div>
<Markdown className={"foo"} content={`
# Hello, world!
Here is some [GitHub-flavored Markdown][GFMD],
rendered with the \`Markdown\` component.
## Margins are stripped, by default
Normally, 4 leading spaces denote a code block
(similar to a triple-backtick line).
[GFMD]: https://github.github.com/gfm/
`}/>
{MD(`
### \`MD\` function
You can also pass a string directly to \`MD\`:
MD("## Markdown!")
`)}
</div>
}