[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-harlan-zw--mdream":3,"tool-harlan-zw--mdream":61},[4,17,27,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",159636,2,"2026-04-17T23:33:34",[13,14,15],"开发框架","Agent","语言模型","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[14,26],"插件",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":10,"last_commit_at":33,"category_tags":34,"status":16},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[26,14,35,13],"图像",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":10,"last_commit_at":42,"category_tags":43,"status":16},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[26,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":50,"last_commit_at":51,"category_tags":52,"status":16},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,3,"2026-04-06T11:19:32",[15,35,14,13],{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":10,"last_commit_at":59,"category_tags":60,"status":16},8553,"spec-kit","github\u002Fspec-kit","Spec Kit 是一款专为提升软件开发效率而设计的开源工具包，旨在帮助团队快速落地“规格驱动开发”（Spec-Driven Development）模式。传统开发中，需求文档往往与代码实现脱节，导致沟通成本高且结果不可控；而 Spec Kit 通过将规格说明书转化为可执行的指令，让 AI 直接依据明确的业务场景生成高质量代码，从而减少从零开始的随意编码，确保产出结果的可预测性。\n\n该工具特别适合希望利用 AI 辅助编程的开发者、技术负责人及初创团队。无论是启动全新项目还是在现有工程中引入规范化流程，用户只需通过简单的命令行操作，即可初始化项目并集成主流的 AI 编程助手。其核心技术亮点在于“规格即代码”的理念，支持社区扩展与预设模板，允许用户根据特定技术栈定制开发流程。此外，Spec Kit 强调官方维护的安全性，提供稳定的版本管理，帮助开发者在享受 AI 红利的同时，依然牢牢掌握架构设计的主动权，真正实现从“凭感觉写代码”到“按规格建系统”的转变。",88749,"2026-04-17T09:48:14",[15,35,14,13],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":77,"owner_email":78,"owner_twitter":79,"owner_website":80,"owner_url":81,"languages":82,"stars":106,"forks":107,"last_commit_at":108,"license":109,"difficulty_score":10,"env_os":110,"env_gpu":111,"env_ram":112,"env_deps":113,"category_tags":120,"github_topics":121,"view_count":10,"oss_zip_url":121,"oss_zip_packed_at":121,"status":16,"created_at":122,"updated_at":123,"faqs":124,"releases":154},8714,"harlan-zw\u002Fmdream","mdream","☁️ The fastest HTML to markdown convertor on GitHub. Optimized for LLMs and supports streaming.","mdream 是一款专为大语言模型（LLM）打造的 HTML 转 Markdown 工具，旨在以极高的效率将网页内容转化为简洁、易读的文本格式。它主要解决了传统转换工具生成的内容冗余、占用大量 Token 以及处理速度较慢的问题，能够显著降低 AI 处理的成本并提升响应速度。\n\n这款工具非常适合开发者、AI 研究人员以及需要构建实时数据管道的工程师使用。无论是需要在服务端进行大规模文档处理，还是在边缘计算环境中运行，mdream 都能提供卓越的支持。其独特的技术亮点在于“极速”与“精简”：基于 Rust 和纯 JavaScript 双引擎打造，转换速度比主流工具快数倍甚至数十倍，同时能减少高达 99% 的无效 Token。此外，mdream 支持流式处理，可轻松应对超大文档的实时转换，且核心体积极小、零依赖，能够灵活集成于 CLI、Docker、GitHub Actions 或 Vite 等多种开发场景中，是构建高效 AI 应用的理想选择。","\u003Ch1>mdream\u003C\u002Fh1>\n\n[![npm version](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fmdream?color=yellow)](https:\u002F\u002Fnpmjs.com\u002Fpackage\u002Fmdream)\n[![npm downloads](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdm\u002Fmdream?color=yellow)](https:\u002F\u002Fnpm.chart.dev\u002Fmdream)\n[![license](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fharlan-zw\u002Fmdream?color=yellow)](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fblob\u002Fmain\u002FLICENSE.md)\n\n> ☁️ The fastest HTML to markdown converter on GitHub. Optimized for LLMs and supports streaming.\n\n> [!TIP]\n> 🎉 **Mdream v1 is here!** Read the [v1 release notes](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Freleases\u002Ftag\u002Fv1.0.0).\n\n\u003Cimg src=\".github\u002Flogo.png\" alt=\"mdream logo\" width=\"200\">\n\n\u003Cp align=\"center\">\n\u003Ctable>\n\u003Ctbody>\n\u003Ctd align=\"center\">\n\u003Csub>Made possible by my \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsponsors\u002Fharlan-zw\">Sponsor Program 💖\u003C\u002Fa>\u003Cbr> Follow me \u003Ca href=\"https:\u002F\u002Ftwitter.com\u002Fharlan_zw\">@harlan_zw\u003C\u002Fa> 🐦 • Join \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002F275MBUBvgP\">Discord\u003C\u002Fa> for help\u003C\u002Fsub>\u003Cbr>\n\u003C\u002Ftd>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003C\u002Fp>\n\n## Features\n\n- 🧠 #1 Token Optimizer: [Up to 2x fewer tokens](#benchmarks) than [Turndown](https:\u002F\u002Fgithub.com\u002Fmixmark-io\u002Fturndown), node-html-markdown, and html-to-markdown. 70-99% fewer tokens than raw HTML.\n- 🚀 #1 Fastest: [Fastest pure JS & native Rust](#benchmarks) converter. Up to 37x faster than Turndown (Rust NAPI vs JS), 4.6x, 5x faster than htmd (Rust vs Rust). Converts 1.8MB HTML in ~5.2ms (Rust).\n- 🔍 Generates [Minimal](.\u002Fpackages\u002Fmdream\u002Fsrc\u002Fpreset\u002Fminimal.ts) GitHub Flavored Markdown: Frontmatter, Nested & HTML markup support.\n- 🌊 Streamable: Memory efficient streaming for large documents and real-time pipelines.\n- ⚡ Tiny: 10kB gzip JS core, 60kB gzip with Rust WASM engine. Zero dependencies.\n- ⚙️ Run anywhere: [CLI Crawler](#mdream-crawl), [Docker](#docker), [GitHub Actions](#github-actions-integration), [Vite](#vite-integration), & more.\n\n## What is Mdream?\n\nA zero-dependency, LLM-optimized HTML to Markdown converter. Faster and leaner than [Turndown](https:\u002F\u002Fgithub.com\u002Fmixmark-io\u002Fturndown), [node-html-markdown](https:\u002F\u002Fgithub.com\u002Fcrosstype\u002Fnode-html-markdown), and [html-to-markdown](https:\u002F\u002Fgithub.com\u002FJohannesKaufmann\u002Fhtml-to-markdown), with output tuned for token efficiency and readability.\n\nOn top of the core converter, Mdream ships packages to generate LLM artifacts like `llms.txt` for your own sites or produce LLM context for any project.\n\n### Mdream Packages\n\nMdream is built to run anywhere for all projects and use cases and is available in the following packages:\n\n| Package                                                                                                                                                                                                  | Description                                                                                                                                                   |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fharlan-zw_mdream_readme_68e951e486fb.png\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\" alt=\"mdream logo\">&nbsp;mdream](.\u002Fpackages\u002Fmdream\u002FREADME.md) | Rust NAPI engine + WASM for edge. Performance-first, declarative config. Includes CLI. |\n| [\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fharlan-zw_mdream_readme_68e951e486fb.png\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\" alt=\"mdream logo\">&nbsp;@mdream\u002Fjs](.\u002Fpackages\u002Fjs\u002FREADME.md) | Pure JS engine. Full hook access, zero native deps. Subpaths: `\u002Fplugins`, `\u002Fsplitter`, `\u002Fparse`, `\u002Fllms-txt`, `\u002Fnegotiate`. |\n| [\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fharlan-zw_mdream_readme_68e951e486fb.png\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\" alt=\"mdream logo\">@mdream\u002Fcrawl](.\u002Fpackages\u002Fcrawl\u002FREADME.md) | Site-wide crawler to generate `llms.txt` artifacts from entire websites                                                                                       |\n| [\u003Cimg src=\"https:\u002F\u002Fapi.iconify.design\u002Flogos:docker-icon.svg\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\" alt=\"docker icon\">&nbsp;Docker](.\u002FDOCKER.md)                                         | Pre-built Docker image with Playwright Chrome for containerized website crawling                                                                              |\n| [\u003Cimg src=\"https:\u002F\u002Fapi.iconify.design\u002Flogos:vitejs.svg\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\" alt=\"vite icon\">&nbsp;@mdream\u002Fvite](.\u002Fpackages\u002Fvite\u002FREADME.md)                            | Generate automatic `.md` for your own Vite sites                                                                                                              |\n| [\u003Cimg src=\"https:\u002F\u002Fapi.iconify.design\u002Flogos:nuxt-icon.svg\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\" alt=\"nuxt icon\">&nbsp;@mdream\u002Fnuxt](.\u002Fpackages\u002Fnuxt\u002FREADME.md)                         | Generate automatic `.md` and `llms.txt` artifacts generation for Nuxt Sites                                                                                   |\n| [\u003Cimg src=\"https:\u002F\u002Fapi.iconify.design\u002Fmdi:github.svg\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\" alt=\"github icon\">&nbsp;@mdream\u002Faction](.\u002Fpackages\u002Faction\u002FREADME.md)                        | Generate `.md` and `llms.txt` artifacts from your static `.html` output                                                                                       |\n| [\u003Cimg src=\"https:\u002F\u002Fapi.iconify.design\u002Flogos:rust.svg\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\" alt=\"rust icon\">&nbsp;mdream (crate)](.\u002Fcrates\u002Fcore\u002FREADME.md)                              | Native Rust crate with CLI. Zero dependencies, streaming support. Available on [crates.io](https:\u002F\u002Fcrates.io\u002Fcrates\u002Fmdream)                                                                                       |\n| [\u003Cimg src=\"https:\u002F\u002Fapi.iconify.design\u002Fmaterial-symbols:language.svg\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\" alt=\"browser icon\">&nbsp;Browser CDN](#browser-cdn-usage)                    | Use mdream directly in browsers via unpkg\u002FjsDelivr without any build step                                |\n\n### What can Mdream do?\n\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>📥 URL to Markdown\u003C\u002Fb>\u003C\u002Fsummary>\n\nFetches the [Markdown Wikipedia page](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FMarkdown) and converts it to Markdown preserving the original links and images.\n\n```bash\ncurl -s https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FMarkdown \\\n | npx mdream@beta --origin https:\u002F\u002Fen.wikipedia.org --preset minimal \\\n  | tee streaming.md\n```\n\n_Tip: The `--origin` flag will fix relative image and link paths_\n\nWant to make it look nice? Use [glow](https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fglow).\n\n```bash\ncurl -s https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FMarkdown \\\n | npx mdream@beta --origin https:\u002F\u002Fen.wikipedia.org --preset minimal \\\n   | glow\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>📄 Local HTML to Markdown\u003C\u002Fb>\u003C\u002Fsummary>\n\nConverts a local HTML file to a Markdown file, using `tee` to write the output to a file and display it in the terminal.\n\n```bash\ncat index.html \\\n | npx mdream@beta --preset minimal \\\n  | tee streaming.md\n```\n\nWant to make it look nice? Use [glow](https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fglow).\n\n```bash\ncat index.html \\\n | npx mdream@beta --preset minimal \\\n  | glow\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>🧠 Feed Any Website to an LLM\u003C\u002Fb>\u003C\u002Fsummary>\n\nPipe web content straight into Claude, GPT, or any LLM CLI:\n\n```bash\n# Single page → Claude\ncurl -s https:\u002F\u002Freact.dev\u002Flearn | npx mdream@beta --origin https:\u002F\u002Freact.dev --preset minimal \\\n  | claude -p \"explain the key concepts on this page\"\n\n# Crawl entire docs → summarize\nnpx @mdream\u002Fcrawl@beta \"https:\u002F\u002Fnuxt.com\u002Fdocs\u002Fgetting-started\u002F**\"\ncat output\u002Fllms-full.txt | claude -p \"write a getting started guide from these docs\"\n\n# Compare two frameworks\ndiff \u003C(curl -s https:\u002F\u002Fvuejs.org\u002Fguide\u002Fintroduction | npx mdream@beta --preset minimal) \\\n     \u003C(curl -s https:\u002F\u002Freact.dev\u002Flearn | npx mdream@beta --preset minimal) \\\n  | claude -p \"compare these two frameworks based on their intro docs\"\n\n# JavaScript\u002FSPA sites (React, Vue, Angular)\nnpx @mdream\u002Fcrawl@beta https:\u002F\u002Fspa-site.com --driver playwright\ncat output\u002Fllms-full.txt | claude -p \"what features does this app have\"\n```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>🌐 Make Your Site AI-Discoverable\u003C\u002Fb>\u003C\u002Fsummary>\n\nGenerate llms.txt to help AI tools understand your site:\n\n```bash\n# Static sites\nnpx @mdream\u002Fcrawl@beta https:\u002F\u002Fyoursite.com\n\n# JavaScript\u002FSPA sites (React, Vue, Angular)\nnpx -p playwright -p @mdream\u002Fcrawl@beta crawl https:\u002F\u002Fspa-site.com --driver playwright\n```\n\nOutputs:\n- `output\u002Fllms.txt` - Optimized for LLM consumption\n- `output\u002Fllms-full.txt` - Complete content with metadata\n- `output\u002Fmd\u002F` - Individual markdown files per page\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>🗄️ Build RAG Systems from Websites\u003C\u002Fb>\u003C\u002Fsummary>\n\nCrawl websites and generate embeddings for vector databases:\n\n```ts\nimport { crawlAndGenerate } from '@mdream\u002Fcrawl'\nimport { withMinimalPreset } from '@mdream\u002Fjs\u002Fpreset\u002Fminimal'\nimport { htmlToMarkdownSplitChunks } from '@mdream\u002Fjs\u002Fsplitter'\nimport { embed } from 'ai'\n\nconst { createTransformersJS } = await import('@built-in-ai\u002Ftransformers-js')\nconst embeddingModel = createTransformersJS().textEmbeddingModel('Xenova\u002Fbge-base-en-v1.5')\n\nconst embeddings = []\n\nawait crawlAndGenerate({\n  urls: ['https:\u002F\u002Fexample.com'],\n  onPage: async ({ url, html, title, origin }) => {\n    const chunks = htmlToMarkdownSplitChunks(html, withMinimalPreset({\n      chunkSize: 1000,\n      chunkOverlap: 200,\n      origin,\n    }))\n\n    for (const chunk of chunks) {\n      const { embedding } = await embed({ model: embeddingModel, value: chunk.content })\n      embeddings.push({ url, title, content: chunk.content, embedding })\n    }\n  },\n})\n\n\u002F\u002F Save to vector database: await saveToVectorDB(embeddings)\n```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>✂️ Extract Specific Content from Pages\u003C\u002Fb>\u003C\u002Fsummary>\n\nPull headers, images, or other elements during conversion:\n\n```ts\nimport { htmlToMarkdown } from 'mdream'\n\nconst headers = []\nconst images = []\n\nhtmlToMarkdown(html, {\n  extraction: {\n    'h1, h2, h3': el => headers.push(el.textContent),\n    'img[src]': el => images.push({ src: el.attributes.src, alt: el.attributes.alt }),\n  },\n})\n```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>⚡ Optimize Token Usage With Clean Mode\u003C\u002Fb>\u003C\u002Fsummary>\n\nUse `clean: true` (enabled by default with `minimal: true`) to automatically reduce token costs:\n\n```ts\nimport { htmlToMarkdown } from 'mdream'\n\n\u002F\u002F All clean features enabled\nhtmlToMarkdown(html, { clean: true })\n\n\u002F\u002F Or selective features\nhtmlToMarkdown(html, {\n  clean: {\n    emptyLinks: true, \u002F\u002F Strip #, javascript: links\n    emptyLinkText: true, \u002F\u002F Drop [](url) links with no text\n    emptyImages: true, \u002F\u002F Strip ![](url) with no alt text\n    redundantLinks: true, \u002F\u002F [url](url) → url\n    selfLinkHeadings: true, \u002F\u002F ## [Title](#title) → ## Title\n    fragments: true, \u002F\u002F Strip broken #anchor links\n    urls: true, \u002F\u002F Strip utm_*, fbclid tracking params\n  }\n})\n```\n\u003C\u002Fdetails>\n\n\n## Mdream Usage\n\n### Installation\n\n```bash\npnpm add mdream@beta\n```\n\n> [!TIP]\n> Generate an Agent Skill for this package using [skilld](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fskilld):\n> ```bash\n> npx skilld add mdream\n> ```\n\n### Bundler Compatibility\n\nThe `mdream` package uses native Node.js bindings (NAPI-RS) which cannot be statically bundled. If your bundler fails to resolve `mdream`, mark it as external:\n\n**Next.js \u002F Turbopack:**\n```js\n\u002F\u002F next.config.js\nconst nextConfig = {\n  serverExternalPackages: ['mdream'],\n}\n```\n\n**Webpack \u002F other bundlers:**\n```js\nexternals: ['mdream']\n```\n\n> [!TIP]\n> [`@mdream\u002Fjs`](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Ftree\u002Fmain\u002Fpackages\u002Fjs) has zero native dependencies and works with all bundlers without configuration.\n\n> [!TIP]\n> Using Vite? [`@mdream\u002Fvite`](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Ftree\u002Fmain\u002Fpackages\u002Fvite) handles this automatically.\n\n### Basic Usage\n\n```ts\nimport { htmlToMarkdown } from 'mdream'\n\n\u002F\u002F Rust NAPI engine in Node.js, WASM in edge\u002Fbrowser runtimes\nconst markdown = htmlToMarkdown('\u003Ch1>Hello World\u003C\u002Fh1>')\nconsole.log(markdown) \u002F\u002F # Hello World\n```\n\n```ts\nimport { streamHtmlToMarkdown } from 'mdream'\n\nconst response = await fetch('https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FMarkdown')\nfor await (const chunk of streamHtmlToMarkdown(response.body, {\n  origin: 'https:\u002F\u002Fen.wikipedia.org',\n  minimal: true,\n})) {\n  process.stdout.write(chunk)\n}\n```\n\nSee the [mdream docs](.\u002Fpackages\u002Fmdream\u002FREADME.md#api-usage) for complete details.\n\n## Mdream Crawl\n\n> Need something that works in the browser or an edge runtime? Use [Mdream](#mdream-usage).\n\nThe `@mdream\u002Fcrawl` package crawls an entire site generating LLM artifacts using `mdream` for Markdown conversion.\n\n- [llms.txt](https:\u002F\u002Fllmstxt.org\u002F): A consolidated text file optimized for LLM consumption.\n- [llms-full.txt](https:\u002F\u002Fllmstxt.org\u002F): An extended format with comprehensive metadata and full content.\n- Individual Markdown Files: Each crawled page is saved as a separate Markdown file in the `md\u002F` directory.\n\n### Usage\n\n```sh\n# Interactive\nnpx @mdream\u002Fcrawl@beta\n# Simple\nnpx @mdream\u002Fcrawl@beta https:\u002F\u002Fharlanzw.com\n# Glob patterns\nnpx @mdream\u002Fcrawl@beta \"https:\u002F\u002Fnuxt.com\u002Fdocs\u002Fgetting-started\u002F**\"\n# Get help\nnpx @mdream\u002Fcrawl@beta -h\n```\n\n## Docker\n\nRun `@mdream\u002Fcrawl` with Playwright Chrome pre-installed for website crawling in containerized environments.\n\n```bash\n# Quick start\ndocker run harlanzw\u002Fmdream:latest site.com\u002Fdocs\u002F**\n\n# Interactive mode\ndocker run -it harlanzw\u002Fmdream:latest\n\n# Using Playwright for JavaScript sites\ndocker run harlanzw\u002Fmdream:latest spa-site.com --driver playwright\n```\n\n**Available Images:**\n- `harlanzw\u002Fmdream:latest` - Latest stable release\n- `ghcr.io\u002Fharlan-zw\u002Fmdream:latest` - GitHub Container Registry\n\nSee [DOCKER.md](.\u002FDOCKER.md) for complete usage, configuration, and building instructions.\n\n## GitHub Actions Integration\n\n### Installation\n\n```bash\npnpm add @mdream\u002Faction@beta\n```\n\nSee the [GitHub Actions README](.\u002Fpackages\u002Faction\u002FREADME.md) for usage and configuration.\n\n## Vite Integration\n\n### Installation\n\n```bash\npnpm install @mdream\u002Fvite@beta\n```\n\nSee the [Vite README](.\u002Fpackages\u002Fvite\u002FREADME.md) for usage and configuration.\n\n## Nuxt Integration\n\n### Installation\n\n```bash\npnpm add @mdream\u002Fnuxt@beta\n```\n\nSee the [Nuxt Module README](.\u002Fpackages\u002Fnuxt\u002FREADME.md) for usage and configuration.\n\n## Browser CDN Usage\n\nUse mdream directly via CDN with no build step. Call `init()` once to load the WASM binary, then use `htmlToMarkdown()` synchronously:\n\n```html\n\u003Cscript src=\"https:\u002F\u002Funpkg.com\u002Fmdream\u002Fdist\u002Fiife.js\">\u003C\u002Fscript>\n\u003Cscript>\n  await window.mdream.init()\n  const markdown = window.mdream.htmlToMarkdown('\u003Ch1>Hello\u003C\u002Fh1>\u003Cp>World\u003C\u002Fp>')\n  console.log(markdown) \u002F\u002F # Hello\\n\\nWorld\n\u003C\u002Fscript>\n```\n\n**CDN Options:**\n- **unpkg**: `https:\u002F\u002Funpkg.com\u002Fmdream\u002Fdist\u002Fiife.js`\n- **jsDelivr**: `https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002Fmdream\u002Fdist\u002Fiife.js`\n\n## Benchmarks\n\n### JavaScript (Node.js)\n\nPure JS comparison. mdream uses no plugins, Turndown uses GFM plugin for equivalent table\u002Fstrikethrough support.\n\n| Input | mdream | Turndown | node-html-markdown | rehype-remark |\n|-------|--------|----------|---------------------|---------------|\n| 166 KB | **3.26ms** | 11.26ms *(3.5x)* | 14.31ms *(4.4x)* | 35.19ms *(10.8x)* |\n| 420 KB | **6.38ms** | 13.63ms *(2.1x)* | 17.11ms *(2.7x)* | 62.10ms *(9.7x)* |\n| 1.8 MB | **57.2ms** | 264.3ms *(4.6x)* | 26,072ms *(456x)* | 826.7ms *(14.5x)* |\n\n### Rust (native, release + LTO)\n\nAll crates compiled with `opt-level=3`, LTO, and single codegen unit.\n\n| Input | mdream | htmd | html2md | html2md-rs | mdka | html_to_markdown |\n|-------|--------|------|---------|------------|------|------------------|\n| 166 KB | **0.34ms** | 2.13ms *(6.3x)* | 2.71ms *(8.0x)* | panicked | 2.65ms *(7.8x)* | 1.72ms *(5.1x)* |\n| 420 KB | **0.41ms** | 3.50ms *(8.6x)* | 4.25ms *(10.4x)* | 1.54ms *(3.8x)* | 3.56ms *(8.7x)* | 2.72ms *(6.7x)* |\n| 1.8 MB | **5.20ms** | 34.4ms *(6.6x)* | >30s | 35.5ms *(6.8x)* | 37.6ms *(7.2x)* | 28.5ms *(5.5x)* |\n\n### Rust NAPI (Node.js bindings)\n\nFor Node.js apps that need native speed. Includes N-API overhead.\n\n| Input | mdream (rust) | html-to-markdown (rust) |\n|-------|---------------|-------------------------|\n| 166 KB | **0.52ms** | 3.94ms *(7.6x)* |\n| 420 KB | **0.76ms** | 7.48ms *(9.8x)* |\n| 1.8 MB | **7.14ms** | 82.9ms *(11.6x)* |\n\n### CLI (cross-language, includes process startup)\n\nEnd-to-end `cat file | tool > \u002Fdev\u002Fnull` via [hyperfine](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Fhyperfine). Includes process startup overhead (~20ms for Node.js, ~1ms for Go\u002FRust).\n\n| Input | mdream (Rust) | mdream (Node.js) | html2markdown (Go) |\n|-------|---------------|-------------------|---------------------|\n| 166 KB | **1.4ms** | 26.9ms | 4.9ms |\n| 420 KB | **2.1ms** | 24.3ms | 5.6ms |\n| 1.8 MB | **10.1ms** | 34.8ms | 75.2ms *(7.5x)* |\n\nmdream's Rust CLI is 2.6-7.5x faster than Go [html2markdown](https:\u002F\u002Fgithub.com\u002FJohannesKaufmann\u002Fhtml-to-markdown). On the 1.8MB file, even the Node.js CLI (with ~20ms startup tax) beats Go by 2.2x. For raw conversion speed without startup overhead, see the JS and Rust tables above.\n\n### Streaming\n\nmdream is the only JavaScript HTML-to-markdown converter with streaming support. In the Go ecosystem, [JohannesKaufmann\u002Fhtml-to-markdown](https:\u002F\u002Fgithub.com\u002FJohannesKaufmann\u002Fhtml-to-markdown) supports streaming via `io.Reader`. No other JS, Rust, or Python converter supports streaming HTML input.\n\n### Token Efficiency\n\nWith `minimal: true`, mdream produces up to **92% fewer tokens** than raw HTML and up to **2x fewer tokens** than competing libraries.\n\n| Page (HTML tokens) | mdream minimal | Turndown | node-html-markdown |\n|---------------------|----------------|----------|---------------------|\n| Wikipedia (21K) | **6,101** (-71%) | 10,435 (-50%) | 10,176 (-52%) |\n| GitHub Docs (62K) | **5,006** (-92%) | 43,983 (-30%) | 8,758 (-86%) |\n| Wikipedia XL (194K) | **152,425** (-21%) | 195,978 (+1%) | 283,136 (+46%) |\n\nBenchmarks run on real-world HTML using [Vitest bench](https:\u002F\u002Fvitest.dev\u002Fguide\u002Ffeatures.html#benchmarking). See [full methodology and reproduction steps](.\u002Fbench\u002FREADME.md).\n\n## Credits\n\n- [ultrahtml](https:\u002F\u002Fgithub.com\u002Fnatemoo-re\u002Fultrahtml): HTML parsing inspiration\n\n## License\n\nLicensed under the [MIT license](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fblob\u002Fmain\u002FLICENSE.md).\n\n","\u003Ch1>mdream\u003C\u002Fh1>\n\n[![npm版本](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fmdream?color=yellow)](https:\u002F\u002Fnpmjs.com\u002Fpackage\u002Fmdream)\n[![npm下载量](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdm\u002Fmdream?color=yellow)](https:\u002F\u002Fnpm.chart.dev\u002Fmdream)\n[![许可证](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fharlan-zw\u002Fmdream?color=yellow)](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fblob\u002Fmain\u002FLICENSE.md)\n\n> ☁️ GitHub 上最快的 HTML 转 Markdown 工具。专为大语言模型优化，并支持流式处理。\n\n> [!TIP]\n> 🎉 **Mdream v1 已发布！** 请阅读 [v1 发布说明](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Freleases\u002Ftag\u002Fv1.0.0)。\n\n\u003Cimg src=\".github\u002Flogo.png\" alt=\"mdream logo\" width=\"200\">\n\n\u003Cp align=\"center\">\n\u003Ctable>\n\u003Ctbody>\n\u003Ctd align=\"center\">\n\u003Csub>由我的 \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsponsors\u002Fharlan-zw\">赞助计划 💖\u003C\u002Fa> 支持\u003Cbr> 关注我 \u003Ca href=\"https:\u002F\u002Ftwitter.com\u002Fharlan_zw\">@harlan_zw\u003C\u002Fa> 🐦 • 加入 \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002F275MBUBvgP\">Discord\u003C\u002Fa> 寻求帮助\u003C\u002Fsub>\u003Cbr>\n\u003C\u002Ftd>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003C\u002Fp>\n\n## 特性\n\n- 🧠 #1 令牌优化器：与 [Turndown](https:\u002F\u002Fgithub.com\u002Fmixmark-io\u002Fturndown)、node-html-markdown 和 html-to-markdown 相比，最多可减少 2 倍的令牌消耗（见#benchmarks）。相比原始 HTML，令牌数量减少 70-99%。\n- 🚀 #1 最快：纯 JavaScript 和原生 Rust 实现中速度最快的转换工具。相比 Turndown（Rust NAPI 对 JavaScript），速度快达 37 倍；比 htmd（Rust 对 Rust）分别快 4.6 倍和 5 倍。使用 Rust 引擎可在约 5.2 毫秒内转换 1.8MB 的 HTML。\n- 🔍 生成 [Minimal](.\u002Fpackages\u002Fmdream\u002Fsrc\u002Fpreset\u002Fminimal.ts) 风格的 GitHub Flavored Markdown：支持 Frontmatter、嵌套结构及 HTML 标记。\n- 🌊 流式处理：内存高效，适合大型文档和实时数据管道。\n- ⚡ 体积小巧：压缩后核心 JavaScript 代码仅 10KB，集成 Rust WASM 引擎后为 60KB。无依赖。\n- ⚙️ 多平台运行：支持 [CLI 爬虫](#mdream-crawl)、[Docker](#docker)、[GitHub Actions](#github-actions-integration)、[Vite](#vite-integration) 等多种方式。\n\n## 什么是 Mdream？\n\n一个零依赖、专为大语言模型优化的 HTML 转 Markdown 工具。相比 [Turndown](https:\u002F\u002Fgithub.com\u002Fmixmark-io\u002Fturndown)、[node-html-markdown](https:\u002F\u002Fgithub.com\u002Fcrosstype\u002Fnode-html-markdown) 和 [html-to-markdown](https:\u002F\u002Fgithub.com\u002FJohannesKaufmann\u002Fhtml-to-markdown)，Mdream 更快、更轻量，输出经过调优，既节省令牌又易于阅读。\n\n除了核心转换功能外，Mdream 还提供多个包，用于生成 LLM 相关工件，例如为您的网站生成 `llms.txt` 文件，或为任何项目准备 LLM 上下文。\n\n### Mdream 包介绍\n\nMdream 设计灵活，适用于各种项目和场景，提供以下多个包：\n\n| 包                                                                                                                                                                                                  | 描述                                                                                                                                                   |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fharlan-zw_mdream_readme_68e951e486fb.png\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\" alt=\"mdream logo\">&nbsp;mdream](.\u002Fpackages\u002Fmdream\u002FREADME.md) | Rust NAPI 引擎 + WASM，适用于边缘计算。性能优先，声明式配置。包含 CLI。 |\n| [\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fharlan-zw_mdream_readme_68e951e486fb.png\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\" alt=\"mdream logo\">&nbsp;@mdream\u002Fjs](.\u002Fpackages\u002Fjs\u002FREADME.md) | 纯 JavaScript 引擎。完全开放 Hook 接口，无原生依赖。子模块包括：`\u002Fplugins`、`\u002Fsplitter`、`\u002Fparse`、`\u002Fllms-txt`、`\u002Fnegotiate`。 |\n| [\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fharlan-zw_mdream_readme_68e951e486fb.png\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\" alt=\"mdream logo\">@mdream\u002Fcrawl](.\u002Fpackages\u002Fcrawl\u002FREADME.md) | 全站爬虫，可从整个网站生成 `llms.txt` 工件                                                                                       |\n| [\u003Cimg src=\"https:\u002F\u002Fapi.iconify.design\u002Flogos:docker-icon.svg\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\" alt=\"docker icon\">&nbsp;Docker](.\u002FDOCKER.md)                                         | 预构建的 Docker 镜像，内置 Playwright Chrome，用于容器化网站爬取                                                                              |\n| [\u003Cimg src=\"https:\u002F\u002Fapi.iconify.design\u002Flogos:vitejs.svg\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\" alt=\"vite icon\">&nbsp;@mdream\u002Fvite](.\u002Fpackages\u002Fvite\u002FREADME.md)                            | 自动为您的 Vite 站点生成 `.md` 文件                                                                                                              |\n| [\u003Cimg src=\"https:\u002F\u002Fapi.iconify.design\u002Flogos:nuxt-icon.svg\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\" alt=\"nuxt icon\">&nbsp;@mdream\u002Fnuxt](.\u002Fpackages\u002Fnuxt\u002FREADME.md)                         | 自动为 Nuxt 站点生成 `.md` 文件及 `llms.txt` 工件                                                                                   |\n| [\u003Cimg src=\"https:\u002F\u002Fapi.iconify.design\u002Flogos:github.svg\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\" alt=\"github icon\">&nbsp;@mdream\u002Faction](.\u002Fpackages\u002Faction\u002FREADME.md)                        | 从您的静态 `.html` 输出中生成 `.md` 和 `llms.txt` 工件                                                                                       |\n| [\u003Cimg src=\"https:\u002F\u002Fapi.iconify.design\u002Fmaterial-symbols:language.svg\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\" alt=\"browser icon\">&nbsp;Browser CDN](#browser-cdn-usage)                    | 无需任何构建步骤，即可通过 unpkg\u002FjsDelivr 在浏览器中直接使用 mdream                                |\n\n### Mdream 能做什么？\n\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>📥 将 URL 转换为 Markdown\u003C\u002Fb>\u003C\u002Fsummary>\n\n抓取 [Markdown 维基百科页面](https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FMarkdown)，并将其转换为 Markdown，同时保留原始链接和图片。\n\n```bash\ncurl -s https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FMarkdown \\\n | npx mdream@beta --origin https:\u002F\u002Fen.wikipedia.org --preset minimal \\\n  | tee streaming.md\n```\n\n_提示：`--origin` 标志会修复相对路径的图片和链接_\n\n想要让它看起来更美观吗？使用 [glow](https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fglow)。\n\n```bash\ncurl -s https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FMarkdown \\\n | npx mdream@beta --origin https:\u002F\u002Fen.wikipedia.org --preset minimal \\\n   | glow\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>📄 将本地 HTML 转换为 Markdown\u003C\u002Fb>\u003C\u002Fsummary>\n\n将本地 HTML 文件转换为 Markdown 文件，使用 `tee` 将输出写入文件并在终端中显示。\n\n```bash\ncat index.html \\\n | npx mdream@beta --preset minimal \\\n  | tee streaming.md\n```\n\n想要让它看起来更美观吗？使用 [glow](https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fglow)。\n\n```bash\ncat index.html \\\n | npx mdream@beta --preset minimal \\\n  | glow\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>🧠 将任何网站的内容输入到 LLM 中\u003C\u002Fb>\u003C\u002Fsummary>\n\n直接将网页内容通过管道传递给 Claude、GPT 或任何 LLM CLI：\n\n```bash\n# 单页 → Claude\ncurl -s https:\u002F\u002Freact.dev\u002Flearn | npx mdream@beta --origin https:\u002F\u002Freact.dev --preset minimal \\\n  | claude -p \"explain the key concepts on this page\"\n\n# 爬取整个文档 → 总结\nnpx @mdream\u002Fcrawl@beta \"https:\u002F\u002Fnuxt.com\u002Fdocs\u002Fgetting-started\u002F**\"\ncat output\u002Fllms-full.txt | claude -p \"write a getting started guide from these docs\"\n\n# 比较两个框架\ndiff \u003C(curl -s https:\u002F\u002Fvuejs.org\u002Fguide\u002Fintroduction | npx mdream@beta --preset minimal) \\\n     \u003C(curl -s https:\u002F\u002Freact.dev\u002Flearn | npx mdream@beta --preset minimal) \\\n  | claude -p \"compare these two frameworks based on their intro docs\"\n\n# JavaScript\u002FSPA 站点（React、Vue、Angular）\nnpx @mdream\u002Fcrawl@beta https:\u002F\u002Fspa-site.com --driver playwright\ncat output\u002Fllms-full.txt | claude -p \"what features does this app have\"\n```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>🌐 让你的网站被 AI 发现\u003C\u002Fb>\u003C\u002Fsummary>\n\n生成 llms.txt，帮助 AI 工具理解你的网站：\n\n```bash\n# 静态网站\nnpx @mdream\u002Fcrawl@beta https:\u002F\u002Fyoursite.com\n\n# JavaScript\u002FSPA 站点（React、Vue、Angular）\nnpx -p playwright -p @mdream\u002Fcrawl@beta crawl https:\u002F\u002Fspa-site.com --driver playwright\n```\n\n输出：\n- `output\u002Fllms.txt` - 针对 LLM 使用优化\n- `output\u002Fllms-full.txt` - 包含元数据的完整内容\n- `output\u002Fmd\u002F` - 每个页面的单独 Markdown 文件\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>🗄️ 从网站构建 RAG 系统\u003C\u002Fb>\u003C\u002Fsummary>\n\n爬取网站并为向量数据库生成嵌入：\n\n```ts\nimport { crawlAndGenerate } from '@mdream\u002Fcrawl'\nimport { withMinimalPreset } from '@mdream\u002Fjs\u002Fpreset\u002Fminimal'\nimport { htmlToMarkdownSplitChunks } from '@mdream\u002Fjs\u002Fsplitter'\nimport { embed } from 'ai'\n\nconst { createTransformersJS } = await import('@built-in-ai\u002Ftransformers-js')\nconst embeddingModel = createTransformersJS().textEmbeddingModel('Xenova\u002Fbge-base-en-v1.5')\n\nconst embeddings = []\n\nawait crawlAndGenerate({\n  urls: ['https:\u002F\u002Fexample.com'],\n  onPage: async ({ url, html, title, origin }) => {\n    const chunks = htmlToMarkdownSplitChunks(html, withMinimalPreset({\n      chunkSize: 1000,\n      chunkOverlap: 200,\n      origin,\n    }))\n\n    for (const chunk of chunks) {\n      const { embedding } = await embed({ model: embeddingModel, value: chunk.content })\n      embeddings.push({ url, title, content: chunk.content, embedding })\n    }\n  },\n})\n\n\u002F\u002F 保存到向量数据库：await saveToVectorDB(embeddings)\n```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>✂️ 从页面中提取特定内容\u003C\u002Fb>\u003C\u002Fsummary>\n\n在转换过程中提取标题、图片或其他元素：\n\n```ts\nimport { htmlToMarkdown } from 'mdream'\n\nconst headers = []\nconst images = []\n\nhtmlToMarkdown(html, {\n  extraction: {\n    'h1, h2, h3': el => headers.push(el.textContent),\n    'img[src]': el => images.push({ src: el.attributes.src, alt: el.attributes.alt }),\n  },\n})\n```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>⚡ 使用 Clean 模式优化 Token 使用\u003C\u002Fb>\u003C\u002Fsummary>\n\n使用 `clean: true`（默认与 `minimal: true` 一起启用）来自动降低 Token 成本：\n\n```ts\nimport { htmlToMarkdown } from 'mdream'\n\n\u002F\u002F 启用所有 Clean 功能\nhtmlToMarkdown(html, { clean: true })\n\n\u002F\u002F 或选择性功能\nhtmlToMarkdown(html, {\n  clean: {\n    emptyLinks: true, \u002F\u002F 去除 #、javascript: 链接\n    emptyLinkText: true, \u002F\u002F 移除没有文本的 [](url) 链接\n    emptyImages: true, \u002F\u002F 移除没有替代文本的 ![](url)\n    redundantLinks: true, \u002F\u002F [url](url) → url\n    selfLinkHeadings: true, \u002F\u002F ## [Title](#title) → ## Title\n    fragments: true, \u002F\u002F 移除损坏的 #anchor 链接\n    urls: true, \u002F\u002F 移除 utm_*、fbclid 等跟踪参数\n  }\n})\n```\n\u003C\u002Fdetails>\n\n\n## Mdream 的使用\n\n### 安装\n\n```bash\npnpm add mdream@beta\n```\n\n> [!TIP]\n> 使用 [skilld](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fskilld) 为此包生成 Agent Skill：\n> ```bash\n> npx skilld add mdream\n> ```\n\n### 打包工具兼容性\n\n`mdream` 包使用原生 Node.js 绑定（NAPI-RS），无法静态打包。如果您的打包工具无法解析 `mdream`，请将其标记为外部依赖：\n\n**Next.js \u002F Turbopack：**\n```js\n\u002F\u002F next.config.js\nconst nextConfig = {\n  serverExternalPackages: ['mdream'],\n}\n```\n\n**Webpack \u002F 其他打包工具：**\n```js\nexternals: ['mdream']\n```\n\n> [!TIP]\n> [`@mdream\u002Fjs`](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Ftree\u002Fmain\u002Fpackages\u002Fjs) 没有原生依赖，可在所有打包工具中无需配置即可使用。\n\n> [!TIP]\n> 使用 Vite？[`@mdream\u002Fvite`](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Ftree\u002Fmain\u002Fpackages\u002Fvite) 会自动处理这个问题。\n\n### 基本用法\n\n```ts\nimport { htmlToMarkdown } from 'mdream'\n\n\u002F\u002F Rust NAPI 引擎在 Node.js 中，WASM 在边缘\u002F浏览器运行时中\nconst markdown = htmlToMarkdown('\u003Ch1>Hello World\u003C\u002Fh1>')\nconsole.log(markdown) \u002F\u002F # Hello World\n```\n\n```ts\nimport { streamHtmlToMarkdown } from 'mdream'\n\nconst response = await fetch('https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FMarkdown')\nfor await (const chunk of streamHtmlToMarkdown(response.body, {\n  origin: 'https:\u002F\u002Fen.wikipedia.org',\n  minimal: true,\n})) {\n  process.stdout.write(chunk)\n}\n```\n\n完整详情请参阅 [mdream 文档](.\u002Fpackages\u002Fmdream\u002FREADME.md#api-usage)。\n\n## Mdream Crawl\n\n> 需要在浏览器或边缘运行时中使用吗？请使用 [Mdream](#mdream-usage)。\n\n`@mdream\u002Fcrawl` 包使用 `mdream` 进行 Markdown 转换，爬取整个网站并生成 LLM 相关文件。\n\n- [llms.txt](https:\u002F\u002Fllmstxt.org\u002F)：针对 LLM 使用优化的整合文本文件。\n- [llms-full.txt](https:\u002F\u002Fllmstxt.org\u002F)：包含全面元数据和完整内容的扩展格式。\n- 单独的 Markdown 文件：每个被抓取的页面都会保存为 `md\u002F` 目录中的单独 Markdown 文件。\n\n### 使用方法\n\n```sh\n# 交互式\nnpx @mdream\u002Fcrawl@beta\n# 简单模式\nnpx @mdream\u002Fcrawl@beta https:\u002F\u002Fharlanzw.com\n\n# 全局模式\nnpx @mdream\u002Fcrawl@beta \"https:\u002F\u002Fnuxt.com\u002Fdocs\u002Fgetting-started\u002F**\"\n# 获取帮助\nnpx @mdream\u002Fcrawl@beta -h\n```\n\n## Docker\n\n在容器化环境中运行预装了 Playwright Chrome 的 `@mdream\u002Fcrawl`，用于网站爬取。\n\n```bash\n# 快速启动\ndocker run harlanzw\u002Fmdream:latest site.com\u002Fdocs\u002F**\n\n# 交互模式\ndocker run -it harlanzw\u002Fmdream:latest\n\n# 使用 Playwright 处理 JavaScript 网站\ndocker run harlanzw\u002Fmdream:latest spa-site.com --driver playwright\n```\n\n**可用镜像：**\n- `harlanzw\u002Fmdream:latest` - 最新稳定版\n- `ghcr.io\u002Fharlan-zw\u002Fmdream:latest` - GitHub 容器注册表\n\n完整用法、配置及构建说明请参阅 [DOCKER.md](.\u002FDOCKER.md)。\n\n## GitHub Actions 集成\n\n### 安装\n\n```bash\npnpm add @mdream\u002Faction@beta\n```\n\n使用和配置方法请参阅 [GitHub Actions README](.\u002Fpackages\u002Faction\u002FREADME.md)。\n\n## Vite 集成\n\n### 安装\n\n```bash\npnpm install @mdream\u002Fvite@beta\n```\n\n使用和配置方法请参阅 [Vite README](.\u002Fpackages\u002Fvite\u002FREADME.md)。\n\n## Nuxt 集成\n\n### 安装\n\n```bash\npnpm add @mdream\u002Fnuxt@beta\n```\n\n使用和配置方法请参阅 [Nuxt 模块 README](.\u002Fpackages\u002Fnuxt\u002FREADME.md)。\n\n## 浏览器 CDN 使用\n\n无需构建步骤，即可通过 CDN 直接使用 mdream。只需调用一次 `init()` 加载 WASM 二进制文件，然后同步使用 `htmlToMarkdown()`：\n\n```html\n\u003Cscript src=\"https:\u002F\u002Funpkg.com\u002Fmdream\u002Fdist\u002Fiife.js\">\u003C\u002Fscript>\n\u003Cscript>\n  await window.mdream.init()\n  const markdown = window.mdream.htmlToMarkdown('\u003Ch1>Hello\u003C\u002Fh1>\u003Cp>World\u003C\u002Fp>')\n  console.log(markdown) \u002F\u002F # Hello\\n\\nWorld\n\u003C\u002Fscript>\n```\n\n**CDN 选项：**\n- **unpkg**: `https:\u002F\u002Funpkg.com\u002Fmdream\u002Fdist\u002Fiife.js`\n- **jsDelivr**: `https:\u002F\u002Fcdn.jsdelivr.net\u002Fnpm\u002Fmdream\u002Fdist\u002Fiife.js`\n\n## 基准测试\n\n### JavaScript (Node.js)\n\n纯 JS 对比。mdream 不使用任何插件，而 Turndown 使用 GFM 插件以实现等效的表格和删除线支持。\n\n| 输入 | mdream | Turndown | node-html-markdown | rehype-remark |\n|-------|--------|----------|---------------------|---------------|\n| 166 KB | **3.26ms** | 11.26ms *(3.5x)* | 14.31ms *(4.4x)* | 35.19ms *(10.8x)* |\n| 420 KB | **6.38ms** | 13.63ms *(2.1x)* | 17.11ms *(2.7x)* | 62.10ms *(9.7x)* |\n| 1.8 MB | **57.2ms** | 264.3ms *(4.6x)* | 26,072ms *(456x)* | 826.7ms *(14.5x)* |\n\n### Rust（原生，release + LTO）\n\n所有 crate 均使用 `opt-level=3`、LTO 和单代码生成单元编译。\n\n| 输入 | mdream | htmd | html2md | html2md-rs | mdka | html_to_markdown |\n|-------|--------|------|---------|------------|------|------------------|\n| 166 KB | **0.34ms** | 2.13ms *(6.3x)* | 2.71ms *(8.0x)* | 发生恐慌 | 2.65ms *(7.8x)* | 1.72ms *(5.1x)* |\n| 420 KB | **0.41ms** | 3.50ms *(8.6x)* | 4.25ms *(10.4x)* | 1.54ms *(3.8x)* | 3.56ms *(8.7x)* | 2.72ms *(6.7x)* |\n| 1.8 MB | **5.20ms** | 34.4ms *(6.6x)* | 超过30秒 | 35.5ms *(6.8x)* | 37.6ms *(7.2x)* | 28.5ms *(5.5x)* |\n\n### Rust NAPI（Node.js 绑定）\n\n适用于需要原生速度的 Node.js 应用程序。包含 N-API 开销。\n\n| 输入 | mdream (rust) | html-to-markdown (rust) |\n|-------|---------------|-------------------------|\n| 166 KB | **0.52ms** | 3.94ms *(7.6x)* |\n| 420 KB | **0.76ms** | 7.48ms *(9.8x)* |\n| 1.8 MB | **7.14ms** | 82.9ms *(11.6x)* |\n\n### CLI（跨语言，包含进程启动）\n\n通过 [hyperfine](https:\u002F\u002Fgithub.com\u002Fsharkdp\u002Fhyperfine) 进行端到端 `cat file | tool > \u002Fdev\u002Fnull` 测试。包含进程启动开销（Node.js 约 20ms，Go\u002FRust 约 1ms）。\n\n| 输入 | mdream (Rust) | mdream (Node.js) | html2markdown (Go) |\n|-------|---------------|-------------------|---------------------|\n| 166 KB | **1.4ms** | 26.9ms | 4.9ms |\n| 420 KB | **2.1ms** | 24.3ms | 5.6ms |\n| 1.8 MB | **10.1ms** | 34.8ms | 75.2ms *(7.5x)* |\n\nmdream 的 Rust CLI 比 Go 的 [html2markdown](https:\u002F\u002Fgithub.com\u002FJohannesKaufmann\u002Fhtml-to-markdown) 快 2.6 至 7.5 倍。在 1.8MB 文件上，即使是带有约 20ms 启动开销的 Node.js CLI，也比 Go 快 2.2 倍。若不考虑启动开销，原始转换速度可参考上述 JS 和 Rust 表格。\n\n### 流式处理\n\nmdream 是唯一支持流式处理的 JavaScript HTML 到 Markdown 转换器。在 Go 生态系统中，[JohannesKaufmann\u002Fhtml-to-markdown](https:\u002F\u002Fgithub.com\u002FJohannesKaufmann\u002Fhtml-to-markdown) 通过 `io.Reader` 支持流式处理。其他任何 JS、Rust 或 Python 转换器都不支持流式 HTML 输入。\n\n### 令牌效率\n\n启用 `minimal: true` 后，mdream 生成的令牌数量比原始 HTML 少多达 **92%**，比竞争库少多达 **2 倍**。\n\n| 页面（HTML 令牌数） | mdream minimal | Turndown | node-html-markdown |\n|---------------------|----------------|----------|---------------------|\n| Wikipedia（21K） | **6,101** (-71%) | 10,435 (-50%) | 10,176 (-52%) |\n| GitHub Docs（62K） | **5,006** (-92%) | 43,983 (-30%) | 8,758 (-86%) |\n| Wikipedia XL（194K） | **152,425** (-21%) | 195,978 (+1%) | 283,136 (+46%) |\n\n基准测试基于真实世界的 HTML，使用 [Vitest bench](https:\u002F\u002Fvitest.dev\u002Fguide\u002Ffeatures.html#benchmarking) 运行。完整的方法论和复现步骤请参阅 [bench\u002FREADME.md](.\u002Fbench\u002FREADME.md)。\n\n## 致谢\n\n- [ultrahtml](https:\u002F\u002Fgithub.com\u002Fnatemoo-re\u002Fultrahtml): HTML 解析的灵感来源\n\n## 许可证\n\n根据 [MIT 许可证](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fblob\u002Fmain\u002FLICENSE.md)授权。","# mdream 快速上手指南\n\nmdream 是 GitHub 上最快的 HTML 转 Markdown 转换器，专为大语言模型（LLM）优化。它支持流式处理，生成的 Markdown 标记更少（Token 效率更高），且速度远超传统工具（如 Turndown）。\n\n## 环境准备\n\n- **操作系统**：Windows、macOS 或 Linux\n- **运行时环境**：\n  - Node.js (推荐 v18+)\n  - 若使用 Rust 原生版本需安装 Rust 工具链（通常 `npx` 会自动处理预编译二进制）\n- **包管理器**：npm、pnpm 或 yarn\n\n> **提示**：国内开发者如遇网络问题，可配置国内镜像源加速安装：\n> ```bash\n> # pnpm\n> pnpm config set registry https:\u002F\u002Fregistry.npmmirror.com\n> # npm\n> npm config set registry https:\u002F\u002Fregistry.npmmirror.com\n> ```\n\n## 安装步骤\n\n### 方式一：作为依赖包安装（推荐用于项目集成）\n\n```bash\npnpm add mdream@beta\n# 或\nnpm install mdream@beta\n```\n\n> **注意**：`mdream` 核心包包含 Native Rust 绑定。如果你的构建工具（如 Next.js\u002FTurbopack, Webpack）报错无法解析，请将其标记为外部依赖：\n>\n> **Next.js (`next.config.js`)**:\n> ```js\n> const nextConfig = {\n>   serverExternalPackages: ['mdream'],\n> }\n> ```\n>\n> **Webpack**:\n> ```js\n> externals: ['mdream']\n> ```\n>\n> 若希望完全避免原生依赖，可安装纯 JS 版本：`pnpm add @mdream\u002Fjs`\n\n### 方式二：命令行直接使用（无需安装）\n\n你可以直接通过 `npx` 运行，无需本地安装：\n\n```bash\nnpx mdream@beta --help\n```\n\n## 基本使用\n\n### 1. 命令行转换 (CLI)\n\n**将本地 HTML 文件转换为 Markdown：**\n\n```bash\ncat index.html | npx mdream@beta --preset minimal | tee output.md\n```\n\n**将网页 URL 转换为 Markdown（自动修复相对路径）：**\n\n```bash\ncurl -s https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FMarkdown \\\n | npx mdream@beta --origin https:\u002F\u002Fen.wikipedia.org --preset minimal \\\n | tee streaming.md\n```\n\n*提示：配合 [glow](https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fglow) 可在终端美化输出效果。*\n\n### 2. 代码集成 (Node.js)\n\n在项目中导入并使用，开启 `clean` 模式以优化 Token 用量：\n\n```ts\nimport { htmlToMarkdown } from 'mdream'\n\nconst html = '\u003Ch1>Hello\u003C\u002Fh1>\u003Cp>World\u003C\u002Fp>'\n\n\u002F\u002F 基础用法\nconst markdown = htmlToMarkdown(html)\n\n\u002F\u002F 优化模式：自动清理无用链接、追踪参数等，减少 Token 消耗\nconst optimized = htmlToMarkdown(html, { \n  clean: true \n})\n\nconsole.log(optimized)\n```\n\n### 3. 高级场景：提取特定内容\n\n在转换过程中提取标题或图片信息：\n\n```ts\nimport { htmlToMarkdown } from 'mdream'\n\nconst headers = []\nconst images = []\n\nhtmlToMarkdown(html, {\n  extraction: {\n    'h1, h2, h3': el => headers.push(el.textContent),\n    'img[src]': el => images.push({ \n      src: el.attributes.src, \n      alt: el.attributes.alt \n    }),\n  },\n})\n```\n\n### 4. 为 LLM 生成上下文 (llms.txt)\n\n使用爬虫包为整个网站生成适合 AI 阅读的文档：\n\n```bash\n# 静态站点\nnpx @mdream\u002Fcrawl@beta https:\u002F\u002Fyoursite.com\n\n# 动态站点 (React\u002FVue 等，需 Playwright)\nnpx -p playwright -p @mdream\u002Fcrawl@beta crawl https:\u002F\u002Fspa-site.com --driver playwright\n```\n\n执行后将在 `output\u002F` 目录生成 `llms.txt` 及分块的 Markdown 文件。","某 AI 初创团队正在构建一个垂直领域的知识库，需要每天从数千个技术博客和文档网站抓取内容，将其清洗后作为上下文输入给大语言模型（LLM）进行训练或问答。\n\n### 没有 mdream 时\n- **Token 成本高昂**：传统转换器生成的 Markdown 包含大量冗余标签和格式噪音，导致输入 LLM 的 Token 数量比必要值多出 2-3 倍，每月 API 支出激增。\n- **处理速度瓶颈**：面对单日数 GB 的 HTML 数据，基于 JavaScript 的旧方案转换耗时过长，导致数据流水线经常堵塞，无法实现准实时更新。\n- **内存溢出风险**：在处理长篇技术文档时，非流式转换方式需要一次性加载整个文件，极易引发服务器内存溢出（OOM）崩溃。\n- **上下文质量参差**：生成的 Markdown 结构混乱，缺乏对 GitHub Flavored Markdown 的原生优化，干扰了模型对核心内容的理解准确度。\n\n### 使用 mdream 后\n- **极致节省 Token**：mdream 专为 LLM 优化，自动剔除无用噪声，相比旧方案减少高达 50% 的 Token 用量，直接大幅降低运营成本。\n- **毫秒级高速转换**：借助 Rust 引擎加速，mdream 能在约 5.2 毫秒内完成 1.8MB 文档的转换，处理效率提升数十倍，轻松应对海量数据并发。\n- **稳定流式处理**：支持内存高效的流式转换模式，即使面对超大文档也能分块处理，彻底杜绝了内存溢出问题，保障管线 7x24 小时稳定运行。\n- **纯净上下文输出**：生成极简且结构清晰的 GitHub Flavored Markdown，显著提升了 LLM 对技术文档的解析精度和回答质量。\n\nmdream 通过极致的速度与 Token 优化，将原本昂贵且脆弱的网页数据采集流程，转变为高效、低成本且稳定的 LLM 数据供给引擎。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fharlan-zw_mdream_daeda987.png","harlan-zw","Harlan Wilton","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fharlan-zw_35fc1b95.jpg","Team @nuxt ◦ @vueuse ◦ @unjs","Myself","Australia","harlan@harlanzw.com","harlan_zw","https:\u002F\u002Fharlanzw.com","https:\u002F\u002Fgithub.com\u002Fharlan-zw",[83,87,91,95,99,103],{"name":84,"color":85,"percentage":86},"TypeScript","#3178c6",56.4,{"name":88,"color":89,"percentage":90},"HTML","#e34c26",37.3,{"name":92,"color":93,"percentage":94},"Rust","#dea584",5.5,{"name":96,"color":97,"percentage":98},"JavaScript","#f1e05a",0.6,{"name":100,"color":101,"percentage":102},"Shell","#89e051",0.1,{"name":104,"color":105,"percentage":102},"Dockerfile","#384d54",867,60,"2026-04-16T14:52:54","MIT","Linux, macOS, Windows","不需要 GPU","未说明（基于 JavaScript\u002FRust，内存占用极低，支持流式处理大文档）",{"notes":114,"python":115,"dependencies":116},"该工具是基于 Rust 和 JavaScript 的 HTML 转 Markdown 转换器，非深度学习模型，因此无需 GPU、Python 环境或大型模型文件。主要提供 npm 包（含原生 Rust 绑定）和纯 JS 版本。若在 Next.js\u002FTurbopack 等环境中使用含原生绑定的版本，需将其配置为外部依赖（external）。支持通过 Docker 容器化运行，也提供浏览器 CDN 直接使用方式。","不需要 Python",[117,118,119],"Node.js (运行 CLI 或 JS 包)","Rust (仅用于从源码构建核心引擎)","Playwright (可选，用于 @mdream\u002Fcrawl 抓取动态网站)",[15,26],null,"2026-03-27T02:49:30.150509","2026-04-18T09:20:48.769501",[125,130,135,140,145,150],{"id":126,"question_zh":127,"answer_zh":128,"source_url":129},39042,"Vite 插件拦截了模块请求（如 `\u002F@vite\u002Fclient`）导致 404 错误，如何解决？","该问题已在 v0.12.3 版本中修复。更新后，插件将正确跳过非文档请求（如脚本或模块），即使请求头包含 `Accept: *\u002F*`，Vite 开发服务器也能正常提供虚拟模块。请升级依赖至最新版本：`npm install mdream@latest` 或指定版本 `v0.12.3`。","https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F21",{"id":131,"question_zh":132,"answer_zh":133,"source_url":134},39043,"爬取生成的 Markdown 文件中，锚点链接（Anchor links）的路径被错误地替换为首页域名，如何处理？","这是一个已知问题，通常发生在将相对锚点链接转换为绝对链接时。如果源页面使用相对链接（如 `#my-anchor`），生成的 Markdown 也会保留为相对链接。在支持标题锚点的 Markdown 渲染器中，只要文档内存在对应的标题（如 `## My Anchor`），该链接即可正常工作。对于更复杂的路径丢失问题，可能需要通过后期处理脚本来修复链接，或者等待官方在后续版本中通过 post-processing 机制解决。","https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F16",{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},39044,"如何为特定 HTML 元素（如 `\u003Cfigure>`）注册自定义转换器或插件？","默认的最小化预设（minimal preset）可能会过滤掉某些标签。你可以尝试以下方法：\n1. 覆盖默认预设配置。\n2. 使用 `config.plugins.unshift` 在插件队列最前方添加处理逻辑。\n3. 在 `beforeNodeProcess` 钩子中修改节点名称（例如将 `figure` 临时改为 `div`）以绕过过滤，但需注意 `node.context` 在不同钩子间可能不共享，直接修改节点属性（如 `node.figure = true`）可能是更有效的变通方案。","https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F39",{"id":141,"question_zh":142,"answer_zh":143,"source_url":144},39045,"设置 `generateIndividualMd: false` 时，生成的 `llms.txt` 仍然包含不存在的 `.md` 文件链接，怎么办？","这是一个已确认的 Bug。当选择不生成独立 Markdown 文件时，`generateLlmsTxt` 函数未能正确判断文件存在性，仍会输出指向 `.md` 文件的相对路径链接。目前官方尚未发布修复补丁，建议暂时避免同时使用这两个相反的配置，或者手动编写脚本在后处理阶段清理 `llms.txt` 中的无效链接，将其替换为原始 URL。","https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F24",{"id":146,"question_zh":147,"answer_zh":148,"source_url":149},39046,"在 Windows 上运行爬虫时提示 'Playwright driver selected but Playwright is not installed' 且自动安装失败，如何解决？","这通常是因为项目未配置 Workspaces 或权限问题导致自动安装脚本失败。解决方法：\n1. 手动在项目根目录运行 `npm install playwright` 或 `npx playwright install` 确保浏览器驱动已安装。\n2. 确保 `package.json` 配置正确，无 workspace 相关报错。\n3. 如果站点缺少 Sitemap，爬虫会自动回退到普通爬取模式，但建议提供具体目标路径（如 `https:\u002F\u002Fexample.com\u002Fdocs\u002F**`）以提高效率。","https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F7",{"id":151,"question_zh":152,"answer_zh":153,"source_url":149},39047,"如果没有 Sitemap 文件，mdream 还能正常爬取网站吗？","可以。如果目标网站没有提供 Sitemap，mdream 会自动回退到常规爬取模式（crawling mode）。不过，为了获得更好的效果并避免爬取整个站点，建议在配置 URL 时提供具体的目标路径通配符（例如 `https:\u002F\u002Fnuxt.com\u002Fdocs\u002F**`），这样爬虫可以更精准地定位文档页面。",[155,160,165,170,175,180,185,189,194,199,204,209,214,219,224,229,234,239,244,249],{"id":156,"version":157,"summary_zh":158,"released_at":159},314954,"v1.0.4","### &nbsp;&nbsp;&nbsp;🐞 错误修复\n\n- **crawl**: 规范化 URL 并防止查询参数导致的无限循环 &nbsp;-&nbsp; 由 @harlan-zw [\u003Csamp>(bdb1c)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002Fbdb1c4b)\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[在 GitHub 上查看更改](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv1.0.3...v1.0.4)","2026-04-13T01:11:34",{"id":161,"version":162,"summary_zh":163,"released_at":164},314955,"v1.0.3","### &nbsp;&nbsp;&nbsp;🐞 修复了若干 bug\n\n- 防止空链接标题\u002Faria-label 泄漏到排除的元素中… &nbsp;-&nbsp; 由 @Ice-Hazymoon 和 **Claude Opus 4.6（1M 上下文）** 在 https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F71 中完成 [\u003Csamp>(93321)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F9332182)\n- **crawl**: 修复了 HTTP 递归 URL 处理中的问题 &nbsp;-&nbsp; 由 @harlan-zw 完成 [\u003Csamp>(cad7b)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002Fcad7bea)\n- **rust**: 移除 \u003Cscript> 标签解析的快速模式 &nbsp;-&nbsp; 由 @harlan-zw 完成 [\u003Csamp>(c09f6)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002Fc09f6e2)\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[在 GitHub 上查看更改](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv1.0.2...v1.0.3)","2026-03-20T13:02:51",{"id":166,"version":167,"summary_zh":168,"released_at":169},314956,"v1.0.2","### &nbsp;&nbsp;&nbsp;🐞 错误修复\n\n- 在 HTML 直通模式下，将 `\u003Cth>` 单元格纳入表格单元格检测中 &nbsp;-&nbsp; 由 @oritwoen 在 https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F67 中提出 [\u003Csamp>(855c9)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F855c9f8)\n- **nuxt**:\n  - 重新导出工具函数 &nbsp;-&nbsp; 由 @harlan-zw 提出 [\u003Csamp>(14060)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F1406062)\n  - Edge 构建 &nbsp;-&nbsp; 由 @harlan-zw 提出 [\u003Csamp>(d1400)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002Fd140012)\n- **rust**:\n  - `\u003Cscript>` 标签内的开始标签会绕过引号跟踪 &nbsp;-&nbsp; 由 @Ice-Hazymoon 和 **Claude Opus 4.6 (1M 上下文)** 在 https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F68 中提出 [\u003Csamp>(881a5)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F881a576)\n- **vite**:\n  - 重新导出工具函数 &nbsp;-&nbsp; 由 @harlan-zw 提出 [\u003Csamp>(fa0d4)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002Ffa0d4cf)\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[在 GitHub 上查看更改](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv1.0.1...v1.0.2)","2026-03-20T04:27:19",{"id":171,"version":172,"summary_zh":173,"released_at":174},314957,"v1.0.0","Mdream v1 搭载原生 Rust 引擎、适用于边缘运行时的 WebAssembly，以及更简洁的声明式 API；同时，仍保留 JavaScript 引擎作为 `@mdream\u002Fjs`，供需要基于命令式钩子插件的用户使用。\n\n## 👀 亮点\n\n### ⚡️ 原生 Rust 引擎\n\n通过 NAPI-RS 实现单次遍历架构：解析与 Markdown 生成同步完成，无需中间 DOM 树。\n\n| 输入大小 | mdream (Rust NAPI) | mdream (JS) | 性能提升 |\n|---|---|---|---|\n| **166 KB** | 🏆 **0.60ms** | 3.36ms | 5.6× |\n| **420 KB** | 🏆 **1.26ms** | 7.79ms | 6.2× |\n| **1.8 MB** | 🏆 **7.83ms** | 62.2ms | 7.9× |\n\n原生 Rust（无 Node.js 开销）在启用 PGO 优化后，处理 1.8MB 数据仅需 **3.84ms**，相比 JS 最高可快约 16 倍。\n\n安装 `mdream` 后，平台特定的二进制文件会自动加载。\n\n### 🌐 WebAssembly 用于边缘运行时\n\n适用于 Cloudflare Workers、Vercel Edge 和浏览器。通过导出条件（`workerd`、`edge-light`、`browser`）可自动选择正确的构建版本，或直接使用 `mdream\u002Fworker`。\n\n### 🔧 声明式插件配置\n\n内置插件采用扁平化的选项对象，而非工厂函数数组。支持序列化，两种引擎均可使用。\n\n```ts\nimport { htmlToMarkdown } from 'mdream'\n\nconst markdown = htmlToMarkdown(html, { minimal: true })\n\n\u002F\u002F 或单独配置\nlet title = ''\nconst markdown = htmlToMarkdown(html, {\n  frontmatter: (fm) => { title = fm.title },\n  filter: { exclude: ['nav', 'footer', 'aside'] },\n  extraction: { h1: el => console.log('标题:', el.textContent) },\n  tagOverrides: { 'x-code': 'pre' },\n})\n```\n\n### 🧩 `@mdream\u002Fjs`：独立 JavaScript 引擎\n\n自定义基于钩子的插件（`createPlugin`、`extractionPlugin` 等回调函数）在此处实现：\n\n```ts\nimport { createPlugin, htmlToMarkdown } from '@mdream\u002Fjs'\n\nconst myPlugin = createPlugin({\n  onNodeEnter(el, state) { \u002F* ... *\u002F },\n  processTextNode(node, state) { \u002F* ... *\u002F },\n})\n\nconst markdown = htmlToMarkdown(html, {\n  frontmatter: true,\n  hooks: [myPlugin],\n})\n```\n\n## 📋 包列表\n\n| 包名 | 描述 |\n|---|---|\n| `mdream` | Rust NAPI 引擎 + 边缘专用 WASM。以性能为优先。主包。 |\n| `@mdream\u002Fjs` | 纯 JavaScript 引擎。完整钩子访问，无原生依赖。子路径：`\u002Fplugins`、`\u002Fsplitter`、`\u002Fpreset\u002Fminimal`、`\u002Fparse`、`\u002Fllms-txt`、`\u002Fnegotiate`。 |\n| `@mdream\u002Fcrawl` | 用于生成 llms.txt 的全站爬虫。 |\n| `@mdream\u002Frust-*` | 平台特定的原生二进制文件（自动解析）。 |\n\n### ⚖️ 引擎对比\n\n`mdream` 是注重性能的引擎；`@mdream\u002Fjs` 则专注于插件扩展性，提供完整的钩子接口且无任何原生依赖。\n\n| 特性 | `mdream` (Rust) | `@mdream\u002Fjs` |\n|---|---|---|\n| 性能 | ~7.8ms（1.8MB） | ~62ms（1.8MB） |\n| 自定义钩子插件 | — | `hooks` |\n| 声明式插件 | ✅ | ✅ |\n| 流式处理 | ✅ | ✅ |\n| 提取与 Frontmatter | ✅ | ✅ |\n| 边缘\u002FWASM | 内置 | JS 可在任何环境运行 |\n| `parseHtml` 访问 | — | ✅ |\n\n---\n\n## ⚠️ 打包工具兼容性\n\n原生 Rust 引擎使用 NAP","2026-03-19T13:06:53",{"id":176,"version":177,"summary_zh":178,"released_at":179},314958,"v1.0.0-beta.14","*无重大变更*\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[在GitHub上查看变更](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv1.0.0-beta.13...v1.0.0-beta.14)","2026-03-18T15:48:05",{"id":181,"version":182,"summary_zh":183,"released_at":184},314959,"v1.0.0-beta.13","### &nbsp;&nbsp;&nbsp;🐞 错误修复\n\n- **parser**: 在 script 标签内处理 `\u003C` 运算符，而不中断解析循环 &nbsp;-&nbsp; 由 @harlan-zw 在 https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F66 中提出 [\u003Csamp>(5fda6)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F5fda602)\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[在 GitHub 上查看更改](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv1.0.0-beta.12...v1.0.0-beta.13)","2026-03-18T15:37:10",{"id":186,"version":187,"summary_zh":188,"released_at":184},314960,"v1.0.0-beta.12","### &nbsp;&nbsp;&nbsp;🚀 功能特性\n\n- **crawl**:\n  - 添加 `allowSubdomains` 选项，用于跨子域名爬取 &nbsp;-&nbsp; 由 @harlan-zw 在 https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F64 中实现 [\u003Csamp>(18e8f)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F18e8fb6)\n  - 增加配置文件支持及可钩子化钩子 &nbsp;-&nbsp; 由 @harlan-zw 在 https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F65 中实现 [\u003Csamp>(90bd6)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F90bd677)\n\n### &nbsp;&nbsp;&nbsp;🐞 错误修复\n\n- 为不安全的指针拷贝和深度映射访问添加边界验证 &nbsp;-&nbsp; 由 @harlan-zw 在 https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F56 中实现 [\u003Csamp>(480ab)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F480ab73)\n- **crawl**:\n  - 支持使用 Playwright 驱动器的单页模式 &nbsp;-&nbsp; 由 @harlan-zw 在 https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F55 中实现 [\u003Csamp>(6e2ba)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F6e2ba92)\n  - 处理 Windows 11 及以上版本中 wmic.exe 返回 ENOENT 的情况 &nbsp;-&nbsp; 由 @harlan-zw 在 https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F57 中实现 [\u003Csamp>(12f02)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F12f0285)\n- **edge**:\n  - 导出缺失的流函数 &nbsp;-&nbsp; 由 @harlan-zw [\u003Csamp>(9c462)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F9c46238)\n- **js**:\n  - 将命名 HTML 实体解码器从 7 项扩展至 244 项 &nbsp;-&nbsp; 由 @oritwoen 在 https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F60 中实现 [\u003Csamp>(b5a61)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002Fb5a6174)\n- **napi**:\n  - 防止分隔符选项中 u32 自动截断为 u8 的无声行为 &nbsp;-&nbsp; 由 @harlan-zw 在 https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F54 中实现 [\u003Csamp>(2549e)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F2549efa)\n- **rust**:\n  - 防止 panic 导致 Node.js 进程崩溃 &nbsp;-&nbsp; 由 @harlan-zw 在 https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F58 中实现 [\u003Csamp>(8a98a)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F8a98a53)\n  - 使用 saturating_add 防止 depth_map u8 溢出 &nbsp;-&nbsp; 由 @harlan-zw 在 https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F53 中实现 [\u003Csamp>(80fef)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F80fefc1)\n  - 添加 cargo-fuzz 测试框架，并修复通过模糊测试发现的 7 处 panic &nbsp;-&nbsp; 由 @harlan-zw [\u003Csamp>(30330)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F3033035)\n  - 防止 \u003C\u002Fmain> 标签关闭后链接出现 ](#) 等残留字符 &nbsp;-&nbsp; 由 @harlan-zw 在 https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F62 中实现 [\u003Csamp>(51317)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F5131799)\n  - 将命名 HTML 实体解码器从 6 项扩展至 245 项 &nbsp;-&nbsp; 由 @oritwoen 和 @harlan-zw 在 https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F61 中共同实现 [\u003Csamp>(0a194)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F0a194a9)\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[在 GitHub 上查看变更](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv1.0.0-beta.11...v1.0.0-beta.12)",{"id":190,"version":191,"summary_zh":192,"released_at":193},314961,"v1.0.0-beta.11","### &nbsp;&nbsp;&nbsp;🐞 修复了错误\n\n- **rust**: 流处理 &nbsp;-&nbsp; 由 @harlan-zw 提交 [\u003Csamp>(66e17)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F66e17db)\n\n### &nbsp;&nbsp;&nbsp;🏎 性能优化\n\n- **crawl**: 原生 HTTP 爬取 &nbsp;-&nbsp; 由 @harlan-zw 提交 [\u003Csamp>(3a6f6)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F3a6f67d)\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[在 GitHub 上查看更改](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv1.0.0-beta.10...v1.0.0-beta.11)","2026-03-18T06:22:38",{"id":195,"version":196,"summary_zh":197,"released_at":198},314962,"v1.0.0-beta.10","### &nbsp;&nbsp;&nbsp;🐞 错误修复\n\n- 修复 IIFE 构建问题 &nbsp;-&nbsp; 由 @harlan-zw [\u003Csamp>(6da2d)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F6da2d66)\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[在 GitHub 上查看更改](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv1.0.0-beta.9...v1.0.0-beta.10)","2026-03-17T12:14:39",{"id":200,"version":201,"summary_zh":202,"released_at":203},314963,"v1.0.0-beta.9","*无重大变更*\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[在GitHub上查看更改](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv1.0.0-beta.8...v1.0.0-beta.9)","2026-03-17T11:55:26",{"id":205,"version":206,"summary_zh":207,"released_at":208},314964,"v1.0.0-beta.7","*No significant changes*\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[View changes on GitHub](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv1.0.0-beta.6...v1.0.0-beta.7)","2026-03-17T11:10:45",{"id":210,"version":211,"summary_zh":212,"released_at":213},314965,"v1.0.0-beta.6","*No significant changes*\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[View changes on GitHub](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv1.0.0-beta.5...v1.0.0-beta.6)","2026-03-17T11:00:55",{"id":215,"version":216,"summary_zh":217,"released_at":218},314966,"v0.17.1","### &nbsp;&nbsp;&nbsp;🐞 Bug Fixes\n\n- Preserve paragraph breaks inside blockquotes &nbsp;-&nbsp; by @chrisvariety and **Claude Opus 4.6 (1M context)** in https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F43 [\u003Csamp>(ceaf1)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002Fceaf158)\n- **crawl**: Validate sitemap XML response before parsing &nbsp;-&nbsp; by @devsunb in https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F44 [\u003Csamp>(9921e)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F9921e2c)\n- **nuxt**: Update types path for runtime types in templates &nbsp;-&nbsp; by @brc-dd in https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F41 [\u003Csamp>(4a139)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F4a13944)\n- **tailwind**: Propagate hidden state to descendant elements &nbsp;-&nbsp; by @devsunb in https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F45 [\u003Csamp>(cdab3)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002Fcdab3a4)\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[View changes on GitHub](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv0.17.0...v0.17.1)","2026-03-16T05:59:12",{"id":220,"version":221,"summary_zh":222,"released_at":223},314967,"v0.17.0","### &nbsp;&nbsp;&nbsp;🚀 Features\n\n- **mdream**: `\u002Fnegotiate` subpath export for shouldServeMarkdown &nbsp;-&nbsp; by @harlan-zw [\u003Csamp>(3ab14)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F3ab14d5)\n- **nuxt**: Hook `mdream:negotiate` &nbsp;-&nbsp; by @harlan-zw [\u003Csamp>(bb0f3)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002Fbb0f3cd)\n\n### &nbsp;&nbsp;&nbsp;🐞 Bug Fixes\n\n- Allow user plugins to override built-ins &nbsp;-&nbsp; by @harlan-zw [\u003Csamp>(0b27a)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F0b27a05)\n- **minimal**: Avoid excluding figures &nbsp;-&nbsp; by @harlan-zw [\u003Csamp>(efe1e)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002Fefe1e3e)\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[View changes on GitHub](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv0.16.0...v0.17.0)","2026-03-10T04:16:23",{"id":225,"version":226,"summary_zh":227,"released_at":228},314968,"v0.16.0","### &nbsp;&nbsp;&nbsp;🚨 Breaking Changes\n\n- **mdream**: Drop readability plugin &nbsp;-&nbsp; by @harlan-zw in https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F35 [\u003Csamp>(27fce)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F27fce37)\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[View changes on GitHub](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv0.15.3...v0.16.0)","2026-02-16T14:08:02",{"id":230,"version":231,"summary_zh":232,"released_at":233},314969,"v0.15.3","### &nbsp;&nbsp;&nbsp;🐞 Bug Fixes\n\n- **llms.txt**: Slightly reworked route grouping &nbsp;-&nbsp; by @harlan-zw [\u003Csamp>(56bb1)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F56bb1ce)\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[View changes on GitHub](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv0.15.2...v0.15.3)","2025-12-08T03:25:06",{"id":235,"version":236,"summary_zh":237,"released_at":238},314970,"v0.15.2","### &nbsp;&nbsp;&nbsp;🐞 Bug Fixes\n\n- **llms.txt**:\n  - Increase description len to 160 &nbsp;-&nbsp; by @harlan-zw [\u003Csamp>(3dc09)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F3dc09d7)\n  - Pretty print pages &nbsp;-&nbsp; by @harlan-zw [\u003Csamp>(58fa1)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F58fa1b5)\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[View changes on GitHub](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv0.15.1...v0.15.2)","2025-12-05T00:59:22",{"id":240,"version":241,"summary_zh":242,"released_at":243},314971,"v0.15.1","### &nbsp;&nbsp;&nbsp;🐞 Bug Fixes\n\n- **llms.txt**: Support `sections` and `notes` &nbsp;-&nbsp; by @harlan-zw [\u003Csamp>(a8ada)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002Fa8ada80)\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[View changes on GitHub](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv0.15.0...v0.15.1)","2025-12-03T23:45:44",{"id":245,"version":246,"summary_zh":247,"released_at":248},314972,"v0.15.0","### &nbsp;&nbsp;&nbsp;🚀 Features\n\n- `createLlmsTxtStream()` &nbsp;-&nbsp; by @harlan-zw in https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fissues\u002F33 [\u003Csamp>(c57c8)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002Fc57c85a)\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[View changes on GitHub](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv0.14.0...v0.15.0)","2025-12-03T01:08:29",{"id":250,"version":251,"summary_zh":252,"released_at":253},314973,"v0.14.0","### &nbsp;&nbsp;&nbsp;🚀 Features\n\n- `htmlToMarkdownSplitChunksStream` &nbsp;-&nbsp; by @harlan-zw [\u003Csamp>(760eb)\u003C\u002Fsamp>](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcommit\u002F760eba8)\n\n##### &nbsp;&nbsp;&nbsp;&nbsp;[View changes on GitHub](https:\u002F\u002Fgithub.com\u002Fharlan-zw\u002Fmdream\u002Fcompare\u002Fv0.13.4...v0.14.0)","2025-12-01T20:14:53"]