0.1.7 • Published 1 year ago

@widcardw/remark-callouts v0.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@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, 
      { 
        leadingIcon: true, // (optional, default: true) add loading icon to the start of summary
        foldIcon: true, // (optional, default: true) add fold icon to the end of summary
        customClass: '__custom_callout', // (optional) ass custom class to <detail> and <summary>
      },
    ],
  },
})

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.

TypeAliases
notenote, seealso
abstractabstract, summary, tldr
infoinfo, todo
tiptip, hint, important
successsuccess, check, done
questionquestion, help, faq
warningwarning, caution, attention
failurefailure, fail, missing
dangerdanger, error
bugbug
exampleexample
quotequote, cite
0.1.7

1 year ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago