Skip to content

Ekstraktor MDC

Obsługuje ekstrahowanie klas ze składni MDC (Markdown Components).

Instalacja

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(),
  ],
})

Zastosuje ekstrakcję na plikach .md .mdc i .markdown, aby ekstrahować użycie klas z wbudowanych propsów. Na przykład

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

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

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

Klasy text-2xl, font-bold, text-blue-500, w-32, h-32 zostaną wyekstrahowane.

Released under the MIT License.