{
  "pattern": {
    "id": "htp_rehype_unified_pipeline",
    "pattern_name": "rehype/unified HTML5 generation pipeline",
    "description": "The rehype/unified ecosystem (rehype, remark-rehype, and related unified plugins) for parsing and producing HTML5 documents programmatically, with type-safe support for citation nodes as the document tree is built or transformed -- the toolchain half of the style-html skill, complementing the markup conventions above.",
    "html_snippet": "import { unified } from \"unified\";\nimport remarkParse from \"remark-parse\";\nimport remarkRehype from \"remark-rehype\";\nimport rehypeStringify from \"rehype-stringify\";\n\nconst html = await unified()\n  .use(remarkParse)\n  .use(remarkRehype)\n  .use(rehypeStringify)\n  .process(markdownWithCitations);",
    "spec_reference": "rehype/unified ecosystem",
    "category": "toolchain",
    "created_at": "2026-07-02 04:46:57",
    "cite_as": "https://subagenthtml.com/api/patterns/htp_rehype_unified_pipeline"
  }
}