# @asyncapi/markdown-template 中文文档

规范地址：https://npmcn.com/package/%40asyncapi/markdown-template/

版本：2\.0\.0
npm 元数据更新时间：2026-07-31T14:02:56.508Z
中文译文更新时间：2026-11-07T01:39:13.171Z
软件包许可：Apache-2\.0

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40asyncapi/markdown-template
原文对照：https://npmcn.com/package/%40asyncapi/markdown-template/?lang=original
项目主页：https://github.com/asyncapi/markdown-template#readme
源码仓库：https://github.com/asyncapi/markdown-template

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：435 kB，81 个文件
- TypeScript 类型：未声明
- 运行依赖：3 个
- 首次发布：2020-02-14T11:47:31.791Z
- 最新版本发布：2025-12-17T11:38:15.790Z
- 近 30 天下载量：14250（2026-10-07 至 2026-11-05，npm 官方下载统计）
- 已发布版本数：81（近 12 个月 3 个）

## 中文简介

AsyncAPI 生成器的标记下模板 .

## 安装

```sh
npm install @asyncapi/markdown-template
```

也可以使用：`pnpm add @asyncapi/markdown-template`、`yarn add @asyncapi/markdown-template`、`bun add @asyncapi/markdown-template`

## README

# AsyncAPI 生成器的下沉模板

[![All Contributors](https://img.shields.io/badge/all_contributors-12-orange.svg?style=flat-square)](https://npmcn.com/package/%40asyncapi/markdown-template/#readme-contributors-)

-   [使用量](https://npmcn.com/package/%40asyncapi/markdown-template/#readme-usage)
-   [支持参数](https://npmcn.com/package/%40asyncapi/markdown-template/#readme-supported-parameters)
-   [发展](https://npmcn.com/package/%40asyncapi/markdown-template/#readme-development)
-   [贡献者](https://npmcn.com/package/%40asyncapi/markdown-template/#readme-contributors-%E2%9C%A8)

## 使用量

安装 AsyncAPI CPI

```bash
npm install -g @asyncapi/cli
```

使用 CLI 生成

```bash
asyncapi generate fromTemplate <asyncapi.yaml> @asyncapi/markdown-template@2.0.0
```

您可以替换 `<asyncapi.yaml>` 本地路径或 URL 指向 [任意 AsyncAPI 文档](https://raw.githubusercontent.com/asyncapi/spec/master/examples/streetlights-kafka-asyncapi.yml)。 。 。 . 调查 [释放](https://npmcn.com/asyncapi/markdown-template/releases) 的模板,以获取所需的版本。 不建议在生产中总是使用最新产品。 总是使用特定版本.

## 支持参数

| 名称 | 说明 | 需求 | 默认 | 允许的值 | 示例 |
| --- | --- | --- | --- | --- | --- |
| 前置马特 | JSON 或 YAML 格式化文件的名称, 包含为静态站点或文档生成器提供 YAML 前题的值, 就像 [这个](https://npmcn.com/package/%40asyncapi/markdown-template/test/spec/ssg.yaml) 一个 文件可能包含 QQtitle 和 QQversion 标签 。 它们被以下AsyncAPI文件的信息所取代: `info.title` 财务报告和审定财务报表 `info.version`。您可以覆盖该版本 `version` 参数. [给](https://npmcn.com/package/%40asyncapi/markdown-template/test/spec/slate.yaml) 您可以看到一个实例,该实例在前题中使用与 [列表](https://github.com/Slatedocs/Slate) | 没有 | 无 | JSON 或 YAML 格式化文件 | `slate.yaml` |
| 外页名 | 输出文件的文件名 . | 没有 | `asyncapi.md` | _任意_ 与 `.md` 扩展 | `index.md` |
| 目标c | 在产出减值中包含一个内容表. | 没有 | `true` | `boolean` | `false` |
| 版本 | 覆盖您的应用程序版本 `info.version` 指定文件中的位置. | 没有 | 版本取自规格文件. | 版本取自 spec 文件 . | `1.0.0` |

## 发展

开发模板的最佳和最可靠的方法是在CLI中使用Genera的构建. 克隆发电机跟随官方 [发展指南](https://github.com/asyncapi/generator/blob/master/Development.md#manually-testing-with-test-templates)。 。 。 .

## 贡献者

感谢这些伟大的人[emoji 密钥](https://allcontributors.org/docs/en/emoji-key):

<table><tbody><tr><td align="center"><a href="http://www.fmvilas.com/" rel="nofollow noopener noreferrer"><img alt="Fran Méndez" src="https://avatars3.githubusercontent.com/u/242119?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>弗朗·门德斯</b></sub></a><br><a href="https://github.com/asyncapi/markdown-template/commits?author=fmvilas" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://github.com/asyncapi/markdown-template/commits?author=fmvilas" title="Documentation" rel="nofollow noopener noreferrer">📖</a> <a href="https://github.com/asyncapi/markdown-template/pulls?q=is%3Apr+reviewed-by%3Afmvilas" title="Reviewed Pull Requests" rel="nofollow noopener noreferrer">👀</a> <a href="https://npmcn.com/package/%40asyncapi/markdown-template/#readme-ideas-fmvilas" title="Ideas, Planning, &amp; Feedback" rel="nofollow noopener noreferrer">🤔</a> <a href="https://npmcn.com/package/%40asyncapi/markdown-template/#readme-maintenance-fmvilas" title="Maintenance" rel="nofollow noopener noreferrer">🚧</a> <a href="https://github.com/asyncapi/markdown-template/issues?q=author%3Afmvilas" title="Bug reports" rel="nofollow noopener noreferrer">🐛</a> <a href="https://github.com/asyncapi/markdown-template/commits?author=fmvilas" title="Tests" rel="nofollow noopener noreferrer">⚠️</a></td><td align="center"><a href="https://resume.github.io/?derberg" rel="nofollow noopener noreferrer"><img alt="Lukasz Gornicki" src="https://avatars1.githubusercontent.com/u/6995927?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>卢卡斯·戈尔尼茨基</b></sub></a><br><a href="https://github.com/asyncapi/markdown-template/commits?author=derberg" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://github.com/asyncapi/markdown-template/commits?author=derberg" title="Documentation" rel="nofollow noopener noreferrer">📖</a> <a href="https://github.com/asyncapi/markdown-template/pulls?q=is%3Apr+reviewed-by%3Aderberg" title="Reviewed Pull Requests" rel="nofollow noopener noreferrer">👀</a> <a href="https://npmcn.com/package/%40asyncapi/markdown-template/#readme-infra-derberg" title="Infrastructure (Hosting, Build-Tools, etc)" rel="nofollow noopener noreferrer">🚇</a> <a href="https://npmcn.com/package/%40asyncapi/markdown-template/#readme-maintenance-derberg" title="Maintenance" rel="nofollow noopener noreferrer">🚧</a> <a href="https://github.com/asyncapi/markdown-template/issues?q=author%3Aderberg" title="Bug reports" rel="nofollow noopener noreferrer">🐛</a> <a href="https://github.com/asyncapi/markdown-template/commits?author=derberg" title="Tests" rel="nofollow noopener noreferrer">⚠️</a></td><td align="center"><a href="https://github.com/ximyro" rel="nofollow noopener noreferrer"><img alt="Ilya Buzlov" src="https://avatars0.githubusercontent.com/u/1026811?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>伊利亚·布斯洛夫</b></sub></a><br><a href="https://github.com/asyncapi/markdown-template/commits?author=ximyro" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://github.com/asyncapi/markdown-template/issues?q=author%3Aximyro" title="Bug reports" rel="nofollow noopener noreferrer">🐛</a></td><td align="center"><a href="https://deltaeight.de/" rel="nofollow noopener noreferrer"><img alt="Julian Rabe" src="https://avatars1.githubusercontent.com/u/19175262?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>朱利安·拉贝</b></sub></a><br><a href="https://github.com/asyncapi/markdown-template/commits?author=schw4rzlicht" title="Code" rel="nofollow noopener noreferrer">💻</a></td><td align="center"><a href="https://github.com/magicmatatjahu" rel="nofollow noopener noreferrer"><img alt="Maciej Urbańczyk" src="https://avatars2.githubusercontent.com/u/20404945?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>马西杰·乌尔班奇克</b></sub></a><br><a href="https://github.com/asyncapi/markdown-template/commits?author=magicmatatjahu" title="Documentation" rel="nofollow noopener noreferrer">📖</a> <a href="https://github.com/asyncapi/markdown-template/commits?author=magicmatatjahu" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://npmcn.com/package/%40asyncapi/markdown-template/#readme-maintenance-magicmatatjahu" title="Maintenance" rel="nofollow noopener noreferrer">🚧</a> <a href="https://github.com/asyncapi/markdown-template/issues?q=author%3Amagicmatatjahu" title="Bug reports" rel="nofollow noopener noreferrer">🐛</a> <a href="https://github.com/asyncapi/markdown-template/pulls?q=is%3Apr+reviewed-by%3Amagicmatatjahu" title="Reviewed Pull Requests" rel="nofollow noopener noreferrer">👀</a> <a href="https://github.com/asyncapi/markdown-template/commits?author=magicmatatjahu" title="Tests" rel="nofollow noopener noreferrer">⚠️</a></td><td align="center"><a href="http://blog.ineat-conseil.fr/" rel="nofollow noopener noreferrer"><img alt="Ludovic Dussart" src="https://avatars.githubusercontent.com/u/5501911?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>卢多维奇·杜萨尔</b></sub></a><br><a href="https://github.com/asyncapi/markdown-template/commits?author=M3lkior" title="Code" rel="nofollow noopener noreferrer">💻</a></td><td align="center"><a href="http://mermade.github.io/" rel="nofollow noopener noreferrer"><img alt="Mike Ralphson" src="https://avatars.githubusercontent.com/u/21603?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>迈克·拉尔夫森</b></sub></a><br><a href="https://github.com/asyncapi/markdown-template/commits?author=MikeRalphson" title="Code" rel="nofollow noopener noreferrer">💻</a></td></tr><tr><td align="center"><a href="https://github.com/stuartforrest-infinity" rel="nofollow noopener noreferrer"><img alt="stuartforrest-infinity" src="https://avatars.githubusercontent.com/u/49638642?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>断层无穷</b></sub></a><br><a href="https://github.com/asyncapi/markdown-template/issues?q=author%3Astuartforrest-infinity" title="Bug reports" rel="nofollow noopener noreferrer">🐛</a> <a href="https://github.com/asyncapi/markdown-template/commits?author=stuartforrest-infinity" title="Code" rel="nofollow noopener noreferrer">💻</a></td><td align="center"><a href="http://dalelane.co.uk/" rel="nofollow noopener noreferrer"><img alt="Dale Lane" src="https://avatars.githubusercontent.com/u/1444788?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>戴尔·莱恩</b></sub></a><br><a href="https://github.com/asyncapi/markdown-template/commits?author=dalelane" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://npmcn.com/package/%40asyncapi/markdown-template/#readme-ideas-dalelane" title="Ideas, Planning, &amp; Feedback" rel="nofollow noopener noreferrer">🤔</a></td><td align="center"><a href="https://github.com/GerMichael" rel="nofollow noopener noreferrer"><img alt="Michael Gerischer" src="https://avatars.githubusercontent.com/u/62344871?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>迈克尔·格里舍</b></sub></a><br><a href="https://github.com/asyncapi/markdown-template/commits?author=GerMichael" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://github.com/asyncapi/markdown-template/issues?q=author%3AGerMichael" title="Bug reports" rel="nofollow noopener noreferrer">🐛</a> <a href="https://github.com/asyncapi/markdown-template/commits?author=GerMichael" title="Tests" rel="nofollow noopener noreferrer">⚠️</a></td><td align="center"><a href="https://github.com/Arya-Gupta" rel="nofollow noopener noreferrer"><img alt="Arya Gupta" src="https://avatars.githubusercontent.com/u/84087089?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>阿里亚·古普塔</b></sub></a><br><a href="https://github.com/asyncapi/markdown-template/commits?author=Arya-Gupta" title="Documentation" rel="nofollow noopener noreferrer">📖</a></td><td align="center"><a href="https://github.com/korifey91" rel="nofollow noopener noreferrer"><img alt="Kirill Efimov" src="https://avatars.githubusercontent.com/u/40362351?v=4?s=100" width="100px;" loading="lazy" decoding="async" referrerpolicy="no-referrer"><br><sub><b>基里尔·埃菲莫夫</b></sub></a><br><a href="https://github.com/asyncapi/markdown-template/commits?author=korifey91" title="Code" rel="nofollow noopener noreferrer">💻</a> <a href="https://github.com/asyncapi/markdown-template/commits?author=korifey91" title="Tests" rel="nofollow noopener noreferrer">⚠️</a></td></tr></tbody></table>

本项目遵循 [全部贡献者](https://github.com/all-contributors/all-contributors) 规格。 任何捐款都欢迎!

## 常见问题

### @asyncapi/markdown-template 是什么？

AsyncAPI 生成器的标记下模板 \.

### 如何安装 @asyncapi/markdown-template？

在项目目录运行 npm install @asyncapi/markdown-template，或使用 pnpm add / yarn add / bun add。

### @asyncapi/markdown-template 支持 TypeScript 吗？

该包的 package\.json 没有声明类型入口。需要类型提示时，可以在 npm 上查找社区维护的 @types/asyncapi\_\_markdown-template 是否存在。

### @asyncapi/markdown-template 可以商用吗？

@asyncapi/markdown-template 使用 Apache-2\.0 许可。宽松许可：允许商业使用、修改和再分发，并附带明确的专利授权；分发时需保留许可与 NOTICE 文件，修改过的文件要注明改动。以上为概括，不构成法律意见，请以许可原文为准。

### @asyncapi/markdown-template 的下载量有多少？

根据 npm 官方下载统计，@asyncapi/markdown-template 在 2026/10/07 – 2026/11/05 这 30 天内被下载 14,250 次，日均约 475 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @asyncapi/markdown-template 还在维护吗？

最新版本 2\.0\.0 发布于 2025/12/17（10 个月前）；至今共发布 81 个版本，其中过去 12 个月发布了 3 个；首次发布于 2020/02/14。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

