Skip to content

MDC Extractor

MDC (Markdown Components) 구문에서 클래스를 추출하는 것을 지원합니다.

설치

bash
pnpm add -D @unocss/extractor-mdc
bash
yarn add -D @unocss/extractor-mdc
bash
npm install -D @unocss/extractor-mdc
bash
bun add -D @unocss/extractor-mdc
ts
import extractorMdc from '@unocss/extractor-mdc'
import { defineConfig } from 'unocss'

export default defineConfig({
  extractors: [
    extractorMdc(),
  ],
})

.md .mdc.markdown 파일에 추출을 적용하여 클래스의 인라인 props 사용을 추출합니다. 예를 들어

md
# Title{.text-2xl.font-bold}

Hello [World]{.text-blue-500}

![image](/image.png){.w-32.h-32}

text-2xl, font-bold, text-blue-500, w-32, h-32 클래스가 추출됩니다.

Released under the MIT License.