{"id":19577122,"url":"https://github.com/q9090960bnb3/mkdocs-import-stat-plugin","last_synced_at":"2026-02-12T20:32:23.225Z","repository":{"id":257804425,"uuid":"864722838","full_name":"q9090960bnb3/mkdocs-import-stat-plugin","owner":"q9090960bnb3","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-02T14:40:39.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T02:00:47.315Z","etag":null,"topics":["import","mkdocs","mkdocs-material","mkdocs-plugin","tabs"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/q9090960bnb3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-29T01:45:55.000Z","updated_at":"2025-03-02T14:40:42.000Z","dependencies_parsed_at":"2024-09-29T06:48:42.376Z","dependency_job_id":"96bc45f0-a722-469b-8788-ad3bf483dfbe","html_url":"https://github.com/q9090960bnb3/mkdocs-import-stat-plugin","commit_stats":null,"previous_names":["q9090960bnb3/import-stat-mkdocs-plugin"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/q9090960bnb3/mkdocs-import-stat-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q9090960bnb3%2Fmkdocs-import-stat-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q9090960bnb3%2Fmkdocs-import-stat-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q9090960bnb3%2Fmkdocs-import-stat-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q9090960bnb3%2Fmkdocs-import-stat-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/q9090960bnb3","download_url":"https://codeload.github.com/q9090960bnb3/mkdocs-import-stat-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q9090960bnb3%2Fmkdocs-import-stat-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29380604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T19:05:20.189Z","status":"ssl_error","status_checked_at":"2026-02-12T19:01:44.216Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["import","mkdocs","mkdocs-material","mkdocs-plugin","tabs"],"created_at":"2024-11-11T07:04:37.153Z","updated_at":"2026-02-12T20:32:23.208Z","avatar_url":"https://github.com/q9090960bnb3.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# import stat for mkdocs\n\n参考 https://shd101wyy.github.io/markdown-preview-enhanced/#/zh-cn/file-imports\n\n## 使用\n\n### install\n\n```sh\npip install mkdocs-import-stat-plugin\n```\n\n### use\n\n```yml\nplugins:\n  - import-stat\n```\n\n## 支持的import 语法有：\n\n- `as`\n  \n@import \"hello.xxx\" {as=\"go\"}\n\n- `line_begin` 和 `line_end`\n\n@import \"hello.xxx\" {line_begin=1, line_end=3}\n\n## 拓展语法\n\n一下测试均在 `material` 主题中测试\n\n- `tab` 用于对整个代码块缩进，这样更好地与 material 的 tabs 兼容\n\n```txt\n@import \"hello.xxx\" {tab}\n```\n\n  - 也可直接缩进使用，但markdown-preview-enhanced 插件在vscode中就会有渲染问题\n\n```txt\n    @import \"hello.xxx\" \n```\n\n- `p_dir` 用于指定上级路径\n\neg:\n\n```sh\n.\n├── docs\n│   ├── code\n│   │   └── test.html\n│   ├── test_dir\n│   │   └── test.md\n```\n\ntest.md\n\n```md\n# test\n\n@import \"../code/test.html\"\n```\n\nmkdocs 插件获取当前路径只会获取到 docs 层，最终导致找不到文件\n\n所以可以使用以下方式解决\n\n```md\n# test\n\n@import \"../code/test.html\" {p_dir=\"test_dir\"}\n```\n\n## 清空flag\n\n如直接用\n\n````txt\n```js {cmd a=x c=x e}\nconsole.log('mkdocs')\n```\n````\n\n后 mkdocs 渲染会出错，该插件会将其 {cmd a=x c=x e} 删除，这样就与markdown-preview-enhanced 插件不冲突了\n\n## abs_path\n\n指示是否为绝对路径\n\n```md\n# test\n以下会搜索 系统下的 `/data/test.md` 文件\n@import \"/data/test.md\" {abs_path} \n\n以下会搜索 当前项目目录下的 `docs/data/test.md` 文件\n@import \"/data/test.md\"\n```\n\n## License\n\n[MIT](https://github.com/q9090960bnb3/import-stat-mkdocs-plugin/blob/main/LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fq9090960bnb3%2Fmkdocs-import-stat-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fq9090960bnb3%2Fmkdocs-import-stat-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fq9090960bnb3%2Fmkdocs-import-stat-plugin/lists"}