{"_id":"@alibot/dumi-plugin-llms","name":"@alibot/dumi-plugin-llms","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.4":{"name":"@alibot/dumi-plugin-llms","version":"1.0.4","description":"Dumi Plugin - parser .md to llms.txt","keywords":["dumi"],"license":"MIT","sideEffects":false,"exports":{".":{"types":"./es/index.d.ts","import":"./es/index.js","require":"./lib/index.js"}},"main":"lib/index.js","module":"es/index.js","types":"es/index.d.ts","dependencies":{"micromatch":"^4.0.8"},"peerDependencies":{"dumi":"^2"},"optionalDependencies":{"react":"^18","react-dom":"^18"},"packageManager":"pnpm@8.0.0","_id":"@alibot/dumi-plugin-llms@1.0.4","gitHead":"c22eaf8a0b638fdb8184338590c18e9c2dfe83ac","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-bkxzb2MqckC5/74GeczSDhcqDJtbR4ky3tKtecldLDRJSyorcvLVDV8E+5qQHus9IhW6d4QNmR4O9bYOo61xOA==","shasum":"054cc08383342fda921d9503261d882701274557","tarball":"https://registry.npmjs.org/@alibot/dumi-plugin-llms/-/dumi-plugin-llms-1.0.4.tgz","fileCount":16,"unpackedSize":94615,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEnLqmXJEXlrPKJIIrX6rnLJcNH3Lvo7fzWWxnINFnceAiEA2nn/uveTJhY+NeymCdb1axFAYmKI0uiLDC+/SrAiqW8="}]},"_npmUser":{"name":"laomu","email":"laomu1988@qq.com"},"directories":{},"maintainers":[{"name":"laomu","email":"laomu1988@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dumi-plugin-llms_1.0.4_1762309931364_0.8522330210818945"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-05T02:32:11.272Z","1.0.4":"2025-11-05T02:32:11.560Z","modified":"2025-11-05T02:32:11.926Z"},"maintainers":[{"name":"laomu","email":"laomu1988@qq.com"}],"description":"Dumi Plugin - parser .md to llms.txt","keywords":["dumi"],"license":"MIT","readme":"\n# dumi将本地markdown输出到新目录\n\n- [x] code标签转换\n- [x] 支持转换表格\n- [x] 原始markdown格式保持（h1、h2等）\n- [x] 换行保持\n- [x] embed标签\n- [x] 配置输出目录\n- [x] 配置输出扩展名\n- [x] 输出合并文件\n- [x] 输出索引文件\n- [x] 限定转换文件范围(patterns)\n- [x] 忽略指定文件\n- [x] 动态产出文件\n\n## Usage\n\n### Install\n\n```bash\nnpm install @alibot/dumi-plugin-llms --save-dev\n```\n\n### Apply\n\n```ts\n// .dumirc.ts\nimport path from 'path';\nexport default {\n  plugins: ['@alibot/dumi-plugin-llms'],\n  llms: {\n    // 输出目录，会将本地参与dumi编译的md文件转到到目录，保持原目录结构。建议不要和原始md文件使用相同目录\n    outputDir: 'llms',\n    // 输出文件扩展名\n    outputExt: '.llms.txt',\n    // 所有文件合并产出\n    fullFile: 'all.llms.txt',\n    // 索引文件\n    indexFile: 'index.llms.txt',\n    // 索引文件引用文件路径前的host, 可改为实际应用部署地址，例如 https://www.xx.xx/docs/\n    indexHost: '',\n    // 文件匹配，可以禁止某些文件被解析, 例如['**/*.md', '!src/test.md]则禁止输出src/test.md文件\n    // patterns: ['*/*.md']\n    // 自定义产出文件路径, (filename, {cwd, outputDir, outputExt}) => string\n    outputFilePath: ((filename, {cwd, outputDir, outputExt}) => {\n      // 忽略首层src文件路径\n      return path.resolve(cwd, outputDir, filename.replace(/^src\\//, '').replace(/\\.md$/, outputExt));\n    }),\n    /** 是否禁用，假如禁用则不会执行解析 */\n    disabled: false,\n    /** 自定义json处理方法，可以在将树转换成markdown前做自定义处理, 注意返回新的tree对象，不要对原始tree进行修改，并保持原始tree结构 */\n    // transformTree?: (tree: HastRoot, filename: string) => HastRoot;\n    /** 自定义转换成markdown的方法, 可以对处理后的md进行转换，例如：将md中的图片转换为base64 */\n    // transformMarkdown?: (md: string, filename: string) => string;\n  },\n};\n```\n\n## 开发调试\n1. `dumi dev`命令启动dumi，可以查看展示实例\n","readmeFilename":"README.md","_rev":"1-94062f53a3c8f8efa67c1b7db54a99b5"}