@widcardw/remark-callouts
TypeScript icon, indicating that this package has built-in type declarations

0.1.6 • Public • Published

@widcardw/remark-callouts

Thanks to @portaljs/remark-callouts.

A plugin that can transform obsidian callouts into custom container.

Usage

Install the plugin.

npm i -D @widcardw/remark-callouts

Import it into remark plugin list.

import { remarkCallouts } from '@widcardw/remark-callouts'
// https://astro.build/config
export default defineConfig({
  // ...
  markdown: {
    remarkPlugins: [remarkCallouts],
    //              ^^^^^^^^^^^^^^
  },
})

Import css at your web app entry.

import '@widcardw/remark-callouts/index.css'

Then it will transform blockquotes like

> [!note] This is a note
> Here is the note content.

into custom container.

You can add the open or closed label to set the container folded or unfolded.

> [!note|closed] This is a note
> Its body will be folded by default.

The following callout types are supported.

Type Aliases
note note, seealso
abstract abstract, summary, tldr
info info, todo
tip tip, hint, important
success success, check, done
question question, help, faq
warning warning, caution, attention
failure failure, fail, missing
danger danger, error
bug bug
example example
quote quote, cite

Readme

Keywords

Package Sidebar

Install

npm i @widcardw/remark-callouts

Weekly Downloads

5

Version

0.1.6

License

MIT

Unpacked Size

34.9 kB

Total Files

7

Last publish

Collaborators

  • widcardw