Remark Github Beta Blockquote Admonitions banner
myl7 myl7

Remark Github Beta Blockquote Admonitions

Git community

Description

remark plugin to add support for GitHub beta blockquote-based admonitions

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

remark-github-beta-blockquote-admonitions

remark plugin to add support for [GitHub beta blockquote-based admonitions](https://github.com/github/feedback/discussions/16925)

If you are viewing the README on NPM, refer to [GitHub README](https://github.com/myl7/remark-github-beta-blockquote-admonitions#readme) for possible documentation update

Install

This package is [ESM only][esm]. In Node.js (version 16+), install with [npm]:

npm install remark-github-beta-blockquote-admonitions

Get Started

import plugin from 'remark-github-beta-blockquote-admonitions'

const options = {} // Plugin options
const html = String(
  await remark().use(remarkParse).use(plugin, options).use(remarkRehype).use(rehypeStringify).process(`\
# Admonitions
> [!Note]
> test
`),
)

The output HTML will be:

Admonitions

Note

test

The legacy ones with titles like `**Note**` is also and still supported. Use the option `legacyTitle` to enable it.

Config

export interface Config {
  classNameMaps: {
    // Classes the `
` block should be added with block: string | string[] | (title: string) => (string | string[]) // Classes the `

` title should be added with title: string | string[] | (title: string) => (string | string[]) } // Which title texts in `

` should make the block considered as admonitions. // This is performed before any other actions, e.g., it gets `[!NOTE]`. titleFilter: string[] | (title: string) => boolean // The function allows you to differ displayed title text in the output with // the one checked in the plugin such as the classes the plugin is going to // add. // The differing is done after the filter check. // This may help you to embed custom title text with particular admonition // ty