{
  "url": "https://unifast.dev/de/docs/packages/node/overview/",
  "locale": "de",
  "title": "@unifast/node",
  "description": "Node.js-Bindung für den unifast Markdown-/MDX-Compiler, angetrieben durch natives Rust",
  "section": "packages",
  "body": "## Überblick\n\n`@unifast/node` ist der primäre Einstiegspunkt für die Verwendung von unifast in Node.js. Es stellt die Funktion [`compile()`](/docs/packages/node/compile) bereit, die den nativen Rust-Compiler für maximale Performance über napi-rs aufruft. Es unterstützt außerdem das Plugin-System und ermöglicht es, HAST-Transformationen nach dem Rust-Kompilierungsschritt in JavaScript anzuwenden.\n\n## Installation\n\n> Das native Rust-Addon muss vorab gebaut werden. Führen Sie `cargo build -p unifast-bindings-node --release` aus, falls die native Binärdatei nicht verfügbar ist.\n\n## Schnellstart\n\n```ts\n\nconst result = compile(\"# Hello, **world**!\");\nconsole.log(result.output);\n// <h1 id=\"hello-world\">Hello, <strong>world</strong>!</h1>\n```\n\n## Plugin-Pipeline\n\nWerden Plugins bereitgestellt, führt `compile()` die folgende Pipeline aus:\n\n1. **Plugins extrahieren** – Trennt `plugins` vom Rest der Optionen\n2. **Optionen zusammenführen** – Führt die `options` jedes Plugins tief in die Kompilierungsoptionen ein\n3. **HAST erzwingen** – Wenn ein Plugin eine `hastTransform` besitzt, verwendet der native Aufruf `outputKind: \"hast\"`\n4. **Native Kompilierung** – Ruft den Rust-Compiler über napi-rs auf\n5. **HAST-Transformationen** – Wendet die `hastTransform` jedes Plugins der Reihe nach an\n6. **Ausgabe konvertieren** – Hat der Benutzer keine HAST-Ausgabe angefordert, wird über `hastToHtml` zurück zu HTML konvertiert\n\n## Integrierte Plugins\n\nDie folgenden Plugin-Factory-Funktionen sind enthalten – eine separate Installation ist nicht erforderlich:\n\n`gfm`, `frontmatter`, `sanitize`, `syntect`, `treeSitter`, `toc`, `externalLinks`, `autolinkHeadings`, `smartypants`, `wikiLink`, `codeImport`, `emoji`, `breaks`, `math`, `githubAlert`, `sectionize`, `directive`, `definitionList`, `rubyAnnotation`, `cjk`\n\n```ts\n\nconst result = compile(source, {\n  plugins: [gfm(), frontmatter(), syntect()],\n});\n```\n\n## Zusammenfassung der Exporte\n\n| Export | Art | Beschreibung |\n|--------|------|-------------|\n| `compile` | function | Markdown/MDX zu HTML oder anderen Formaten kompilieren |\n| `gfm`, `frontmatter`, ... | function | Integrierte Plugin-Factories (insgesamt 20) |\n| `hastToHtml` | function | HAST-zu-HTML-Serialisierer (aus `@unifast/core` reexportiert) |\n| `CompileOptions` | type | Kompilierungskonfiguration |\n| `CompileResult` | type | Kompilierungsergebnis |\n| `UnifastPlugin` | type | Plugin-Schnittstelle |\n| `TocEntry` | type | Inhaltsverzeichnis-Eintrag |\n| `HastRoot` | type | HAST-Wurzelknoten |\n| `HastElement` | type | HAST-Elementknoten |\n| `HastText` | type | HAST-Textknoten |\n| `HastNode` | type | Vereinigung aller HAST-Knotentypen |\n| `UnifastError` | class | Basisfehlerklasse |\n| `ParseError` | class | Parse-Fehlerklasse |\n| `CompileError` | class | Kompilier-Fehlerklasse |",
  "alternates": [
    {
      "locale": "en",
      "url": "https://unifast.dev/docs/packages/node/overview/",
      "api": "https://unifast.dev//api/docs/packages/node/overview.json"
    },
    {
      "locale": "ja",
      "url": "https://unifast.dev/ja/docs/packages/node/overview/",
      "api": "https://unifast.dev//api/ja/docs/packages/node/overview.json"
    },
    {
      "locale": "zh-CN",
      "url": "https://unifast.dev/zh-CN/docs/packages/node/overview/",
      "api": "https://unifast.dev//api/zh-CN/docs/packages/node/overview.json"
    },
    {
      "locale": "zh-TW",
      "url": "https://unifast.dev/zh-TW/docs/packages/node/overview/",
      "api": "https://unifast.dev//api/zh-TW/docs/packages/node/overview.json"
    },
    {
      "locale": "ko",
      "url": "https://unifast.dev/ko/docs/packages/node/overview/",
      "api": "https://unifast.dev//api/ko/docs/packages/node/overview.json"
    },
    {
      "locale": "fr",
      "url": "https://unifast.dev/fr/docs/packages/node/overview/",
      "api": "https://unifast.dev//api/fr/docs/packages/node/overview.json"
    },
    {
      "locale": "it",
      "url": "https://unifast.dev/it/docs/packages/node/overview/",
      "api": "https://unifast.dev//api/it/docs/packages/node/overview.json"
    },
    {
      "locale": "es",
      "url": "https://unifast.dev/es/docs/packages/node/overview/",
      "api": "https://unifast.dev//api/es/docs/packages/node/overview.json"
    },
    {
      "locale": "pt-BR",
      "url": "https://unifast.dev/pt-BR/docs/packages/node/overview/",
      "api": "https://unifast.dev//api/pt-BR/docs/packages/node/overview.json"
    },
    {
      "locale": "de",
      "url": "https://unifast.dev/de/docs/packages/node/overview/",
      "api": "https://unifast.dev//api/de/docs/packages/node/overview.json"
    },
    {
      "locale": "ru",
      "url": "https://unifast.dev/ru/docs/packages/node/overview/",
      "api": "https://unifast.dev//api/ru/docs/packages/node/overview.json"
    },
    {
      "locale": "hi",
      "url": "https://unifast.dev/hi/docs/packages/node/overview/",
      "api": "https://unifast.dev//api/hi/docs/packages/node/overview.json"
    },
    {
      "locale": "id",
      "url": "https://unifast.dev/id/docs/packages/node/overview/",
      "api": "https://unifast.dev//api/id/docs/packages/node/overview.json"
    },
    {
      "locale": "tr",
      "url": "https://unifast.dev/tr/docs/packages/node/overview/",
      "api": "https://unifast.dev//api/tr/docs/packages/node/overview.json"
    },
    {
      "locale": "vi",
      "url": "https://unifast.dev/vi/docs/packages/node/overview/",
      "api": "https://unifast.dev//api/vi/docs/packages/node/overview.json"
    }
  ]
}
