{"_id":"@cogita/plugin-content-check","_rev":"4-665108d60cc7c3970b9f6cd9f4b47b9e","name":"@cogita/plugin-content-check","dist-tags":{"latest":"0.2.5"},"versions":{"0.2.0":{"name":"@cogita/plugin-content-check","version":"0.2.0","keywords":["cogita","plugin","content","quality","diagnostics","validation"],"author":{"name":"wu9o","email":"https://github.com/wu9o"},"license":"MIT","_id":"@cogita/plugin-content-check@0.2.0","maintainers":[{"name":"wu9o","email":"wu9ors@gmail.com"}],"homepage":"https://github.com/wu9o/cogita/tree/main/plugins/content-check#readme","bugs":{"url":"https://github.com/wu9o/cogita/issues"},"dist":{"shasum":"d8d3949890f8f8c23a4c688b8be07d22d3ae1a03","tarball":"https://registry.npmjs.org/@cogita/plugin-content-check/-/plugin-content-check-0.2.0.tgz","fileCount":9,"integrity":"sha512-B8G7YH0XnRcKwJaDGZEgsEkZoHB62b/7g7sgtMX5p3v/aNyOggnlCzqV0wrt4S/77WX0CrUwLd8G8ngbhAfTWA==","signatures":[{"sig":"MEYCIQD7QxfVp1GRK3B8qoRZqTmLLGORX70vgQAXEaxFpK9buQIhAMQe+8o7S0jwj6gmxVz/odLCHucIfCBLHqUHB+LEAXOh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19015},"main":"./dist/index.js","type":"module","_from":"file:cogita-plugin-content-check-0.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"rslib build -w","test":"pnpm build && node --test tests/*.test.mjs","build":"rslib build","clean":"rm -rf dist"},"_npmUser":{"name":"wu9o","email":"wu9ors@gmail.com"},"_resolved":"/tmp/146aa07afe84e31656fdc7ebec3098ce/cogita-plugin-content-check-0.2.0.tgz","_integrity":"sha512-B8G7YH0XnRcKwJaDGZEgsEkZoHB62b/7g7sgtMX5p3v/aNyOggnlCzqV0wrt4S/77WX0CrUwLd8G8ngbhAfTWA==","repository":{"url":"git+https://github.com/wu9o/cogita.git","type":"git","directory":"plugins/content-check"},"_npmVersion":"10.8.2","description":"Cogita 内容质量与构建诊断插件。","directories":{},"_nodeVersion":"18.20.8","dependencies":{"glob":"^11.0.0","gray-matter":"^4.0.3","@rspress/core":"^1.45.1","@cogita/plugin-posts-frontmatter":"0.1.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.4","@rslib/core":"0.11.2","@types/node":"^18.11.17","@cogita/shared":"0.9.1","rsbuild-plugin-publint":"^0.3.3"},"peerDependencies":{"@cogita/plugin-posts-frontmatter":"0.1.1"},"_npmOperationalInternal":{"tmp":"tmp/plugin-content-check_0.2.0_1787569584075_0.8528626252444391","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@cogita/plugin-content-check","version":"0.2.1","keywords":["cogita","plugin","content","quality","diagnostics","validation"],"author":{"name":"wu9o","email":"https://github.com/wu9o"},"license":"MIT","_id":"@cogita/plugin-content-check@0.2.1","maintainers":[{"name":"wu9o","email":"wu9ors@gmail.com"}],"homepage":"https://github.com/wu9o/cogita/tree/main/plugins/content-check#readme","bugs":{"url":"https://github.com/wu9o/cogita/issues"},"dist":{"shasum":"6720acdbd50968cdcca582a6f54863519ee1f638","tarball":"https://registry.npmjs.org/@cogita/plugin-content-check/-/plugin-content-check-0.2.1.tgz","fileCount":9,"integrity":"sha512-aqhn+pT/ilHgHjBQ7GPMcC+32IcTmdlQO9MX3T1tIaIzgecHrGMdoDgQKn1jM2aLu4WPjDg4ZBpJyk6FlmWg3w==","signatures":[{"sig":"MEYCIQDN5wx5iLHYJclLhNTLXUgRtXt7peYzvJijJSFlklyGsgIhAMjb2xuTcffQX3CsTsKX6WTfn7wwpQ+jsgkG86csjHjY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19101},"main":"./dist/index.js","type":"module","_from":"file:cogita-plugin-content-check-0.2.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"rslib build -w","test":"pnpm build && node --test tests/*.test.mjs","build":"rslib build","clean":"rm -rf dist"},"_npmUser":{"name":"wu9o","email":"wu9ors@gmail.com"},"_resolved":"/tmp/aaa6dc844941c7c9cb6c9611c5911ba8/cogita-plugin-content-check-0.2.1.tgz","_integrity":"sha512-aqhn+pT/ilHgHjBQ7GPMcC+32IcTmdlQO9MX3T1tIaIzgecHrGMdoDgQKn1jM2aLu4WPjDg4ZBpJyk6FlmWg3w==","repository":{"url":"git+https://github.com/wu9o/cogita.git","type":"git","directory":"plugins/content-check"},"_npmVersion":"10.8.2","description":"Cogita 内容质量与构建诊断插件。","directories":{},"_nodeVersion":"18.20.8","dependencies":{"glob":"^11.0.0","gray-matter":"^4.0.3","@rspress/core":"^1.45.1","@cogita/plugin-posts-frontmatter":"0.1.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.4","@rslib/core":"0.11.2","@types/node":"^18.11.17","@cogita/shared":"0.10.0","rsbuild-plugin-publint":"^0.3.3"},"peerDependencies":{"@cogita/plugin-posts-frontmatter":"0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/plugin-content-check_0.2.1_1787639084386_0.7146422132104249","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@cogita/plugin-content-check","version":"0.2.2","keywords":["cogita","plugin","content","quality","diagnostics","validation"],"author":{"name":"wu9o","email":"https://github.com/wu9o"},"license":"MIT","_id":"@cogita/plugin-content-check@0.2.2","maintainers":[{"name":"wu9o","email":"wu9ors@gmail.com"}],"homepage":"https://github.com/wu9o/cogita/tree/main/plugins/content-check#readme","bugs":{"url":"https://github.com/wu9o/cogita/issues"},"dist":{"shasum":"ee675ae3be802d74efb05ab3e0d08da5f12abd55","tarball":"https://registry.npmjs.org/@cogita/plugin-content-check/-/plugin-content-check-0.2.2.tgz","fileCount":9,"integrity":"sha512-Tpc2QuEZVsOBhXBqXKNPCofoLrDdPJRpL15nlq+fY1O2XEvTGAQt3wma8BYr0lHdtCgejWPRfRi7L2qe2raCMg==","signatures":[{"sig":"MEUCIBf41XYyQ6w9zxZcqSHvvRDV56rLP/hMKfhp6BYcGQ8dAiEAyaMRfJ2RPb9TJC2LLzPbEUZdyW2XRGJMSQWKYeqgFwA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18767},"main":"./dist/index.js","type":"module","_from":"file:cogita-plugin-content-check-0.2.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"rslib build -w","test":"pnpm build && node --test tests/*.test.mjs","build":"rslib build","clean":"rm -rf dist"},"_npmUser":{"name":"wu9o","email":"wu9ors@gmail.com"},"_resolved":"/tmp/396f7e2f79dc6e1d1689dbc6caf2ca7a/cogita-plugin-content-check-0.2.2.tgz","_integrity":"sha512-Tpc2QuEZVsOBhXBqXKNPCofoLrDdPJRpL15nlq+fY1O2XEvTGAQt3wma8BYr0lHdtCgejWPRfRi7L2qe2raCMg==","repository":{"url":"git+https://github.com/wu9o/cogita.git","type":"git","directory":"plugins/content-check"},"_npmVersion":"10.8.2","description":"Cogita 内容质量与构建诊断插件。","directories":{},"_nodeVersion":"18.20.8","dependencies":{"glob":"^11.0.0","gray-matter":"^4.0.3","@rspress/core":"^1.45.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.0.4","@rslib/core":"0.11.2","@types/node":"^18.11.17","@cogita/shared":"0.11.0","rsbuild-plugin-publint":"^0.3.3"},"_npmOperationalInternal":{"tmp":"tmp/plugin-content-check_0.2.2_1787724965497_0.24839601717794935","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"name":"@cogita/plugin-content-check","version":"0.2.5","description":"Cogita 内容质量与构建诊断插件。","keywords":["cogita","plugin","content","quality","diagnostics","validation"],"author":{"name":"wu9o","email":"https://github.com/wu9o"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/wu9o/cogita.git","directory":"plugins/content-check"},"bugs":{"url":"https://github.com/wu9o/cogita/issues"},"homepage":"https://github.com/wu9o/cogita/tree/main/plugins/content-check#readme","type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"dependencies":{"@rspress/core":"^1.45.1","glob":"^11.0.0","gray-matter":"^4.0.3","@cogita/shared":"0.13.0"},"devDependencies":{"@rslib/core":"0.11.2","@types/node":"^18.11.17","rsbuild-plugin-publint":"^0.3.3","typescript":"^5.0.4"},"scripts":{"build":"rslib build","dev":"rslib build -w","clean":"rm -rf dist","test":"pnpm build && node --test tests/*.test.mjs"},"_id":"@cogita/plugin-content-check@0.2.5","_integrity":"sha512-Tzx4OqrWPi+Is8V4NBdNULn2XSEsG3KBOJzz5dR0COoKR1UP94Zg4zJaq4vzCLpkJVqkWNu/ngKcAARUukMtrw==","_resolved":"/tmp/f4eb61a9aea68a406e7b8d1d979bd3dd/cogita-plugin-content-check-0.2.5.tgz","_from":"file:cogita-plugin-content-check-0.2.5.tgz","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"integrity":"sha512-Tzx4OqrWPi+Is8V4NBdNULn2XSEsG3KBOJzz5dR0COoKR1UP94Zg4zJaq4vzCLpkJVqkWNu/ngKcAARUukMtrw==","shasum":"32579b7f82bc7066913b2f4e91c7eabf1ad452d2","tarball":"https://registry.npmjs.org/@cogita/plugin-content-check/-/plugin-content-check-0.2.5.tgz","fileCount":9,"unpackedSize":20954,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIC2Q+s8dii72Q1xpTmdFUywxBjXnc92vo+nxyzTM0ifZAiEAkucg/pYDca7PPmBbJwB4SXzPjcqesUhzZKyK3giQE8k="}]},"_npmUser":{"name":"wu9o","email":"wu9ors@gmail.com"},"directories":{},"maintainers":[{"name":"wu9o","email":"wu9ors@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-content-check_0.2.5_1788404983495_0.20133055711699765"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-24T11:06:23.892Z","modified":"2026-09-03T03:09:43.821Z","0.2.0":"2026-08-24T11:06:24.230Z","0.2.1":"2026-08-25T06:24:44.523Z","0.2.2":"2026-08-26T06:16:05.631Z","0.2.5":"2026-09-03T03:09:43.624Z"},"bugs":{"url":"https://github.com/wu9o/cogita/issues"},"author":{"name":"wu9o","email":"https://github.com/wu9o"},"license":"MIT","homepage":"https://github.com/wu9o/cogita/tree/main/plugins/content-check#readme","keywords":["cogita","plugin","content","quality","diagnostics","validation"],"repository":{"type":"git","url":"git+https://github.com/wu9o/cogita.git","directory":"plugins/content-check"},"description":"Cogita 内容质量与构建诊断插件。","maintainers":[{"name":"wu9o","email":"wu9ors@gmail.com"}],"readme":"# @cogita/plugin-content-check\n\nCogita 的内容质量与构建诊断插件，用于在静态构建阶段发现文章或普通文档的元数据、路由和本地图片引用问题。\n\n```ts\nexport default defineConfig({\n  contentCheck: {\n    enabled: true,\n    reportPath: 'content-report.json',\n    failOnError: false,\n    requiredFields: ['title', 'date'],\n    checkImages: true,\n    checkImageAlt: true,\n    checkRoutes: true,\n    checkEmptyContent: true,\n    checkLinks: true,\n    severity: {\n      'missing-link': 'warning',\n    },\n    ignores: [{ code: 'missing-link', route: '/posts/legacy' }],\n  },\n});\n```\n\n插件默认只输出警告和 JSON 报告，不会改变现有构建结果。可以用 `severity` 按问题代码调整为 `error`、`warning` 或 `ignore`，也可以用 `ignores` 按代码、路由或文件路径忽略特定问题。需要将内容错误纳入 CI 门禁时，再显式设置 `failOnError: true`。报告会在构建继续失败时尽可能提前写入，便于 CI 保留诊断结果。\n\n报告使用统一的 `schemaVersion: 1`、`reportType: \"content-check\"`、`itemCount`、`errors`、`warnings` 和 `issues` 字段。构建后可以使用仓库中的 `scripts/check-quality-reports.mjs` 合并内容与 SEO 报告，并通过 `--max-errors`、`--max-warnings` 设置 CI 门禁；GitHub Actions 会自动生成 annotation。插件通过统一 `ContentIndex` 同时检查文章和普通文档，普通文档可以不提供 `date` frontmatter。\n","readmeFilename":"README.md"}