diff --git a/zh-cn/contribute/OpenHarmony-JavaScript-docs-guide.md b/zh-cn/contribute/OpenHarmony-JavaScript-docs-guide.md index 3bc75a23adea7ed5ca2094fc0663fd76e0bc8dda..52a41a44dbf548cfab3dda603d57bd20f2b63547 100644 --- a/zh-cn/contribute/OpenHarmony-JavaScript-docs-guide.md +++ b/zh-cn/contribute/OpenHarmony-JavaScript-docs-guide.md @@ -48,11 +48,11 @@ ## 明确文档结构(应用开发) -应用开发文档链接: [https://](https://gitee.com/openharmony/docs/tree/master/zh-cn/application-dev)[gitee.com/openharmony/docs/tree/master/zh-cn/application-dev](https://gitee.com/openharmony/docs/tree/master/zh-cn/application-dev) +应用开发文档链接: https://gitee.com/openharmony/docs/tree/master/zh-cn/application-dev 开发指南按不同功能分文件夹,平铺在application-dev中,比如media存放媒体开发指南,usb存放usb服务的开发指南。API参考统一放到application/reference/apis文件夹中。 -![](figures\figure1.png) +![](figures/figure1.png) ## 每一个文档包含的内容(JS API和开发指南) @@ -61,7 +61,7 @@ 3. Readme:目录 每一个新增的md文档,都需要写在Readme中。 4. 文档:重点关注文档命名,详见后续描述。 - + ## JS API内容写作 @@ -69,7 +69,7 @@ 该模块(以一个d.ts为单位)之前是否有文档?——是,在原有的文档里继续添加新增接口。否,新建一个markdown(md)文件。 - + 1. **文件命名:**一个d.ts文件对应一个js api接口文档。**文件名称:js-apis-模块名.md**。示例: @@ -91,7 +91,7 @@ ### 内容写作 -JS API 文档模板路径:[https://](https://gitee.com/openharmony/docs/blob/master/zh-cn/contribute/template/js-template.md)[gitee.com/openharmony/docs/blob/master/zh-cn/contribute/template/js-template.md](https://gitee.com/openharmony/docs/blob/master/zh-cn/contribute/template/js-template.md) +JS API 文档模板路径:https://gitee.com/openharmony/docs/blob/master/zh-cn/contribute/template/js-template.md **每一个文档必须包含的内容:** @@ -99,7 +99,7 @@ JS API 文档模板路径:[https://](https://gitee.com/openharmony/docs/blob/m - **起始版本说明(必选):**本模块首批接口的起始版本,以说明的形式进行插入。 - + - **模块说明(必选):**对该模块提供的功能、使用场景和使用建议进行简要描述。 @@ -128,15 +128,15 @@ JS API 文档模板路径:[https://](https://gitee.com/openharmony/docs/blob/m **标题层级:** -![](figures\figure5.png) +![](figures/figure5.png) **大于初始版本的所有内容,均需说明起始版本:** 1. 如果新版本增加了一个类,则该类、类的方法、类的属性均需打上版本标记。以全球化intl的文档为例说明。 - intl的起始版本是API 7,在API 8新增了类**Collator、constructor方法等**。**于是给类Collator及其所有的方法打上8+的上标。**直接在新增内容后面标记 。 + intl的起始版本是API 7,在API 8新增了类**Collator、constructor方法等**。**于是给类Collator及其所有的方法打上8+的上标。**直接在新增内容后面标记 。 - + 2. 对于新版本废弃的内容,不能直接在文档上删去,需在废弃内容后面加上标标注deprecated,并使用“>”引用语法建议使用的替代方式,加上对应的链接。示例如下: @@ -148,15 +148,16 @@ JS API 文档模板路径:[https://](https://gitee.com/openharmony/docs/blob/m 1. 参数返回值说明、示例代码写作示例: -![](figures\figure8.png) 2. 类、interface写作示例: +![](figures/figure8.png) + 2. 类、interface写作示例: -![](figures\figure9.png) +![](figures/figure9.png) ## JS 开发指南写作 ### 文档创建方式 -![](figures\figure10.png) +![](figures/figure10.png) **注意:** @@ -166,9 +167,9 @@ JS API 文档模板路径:[https://](https://gitee.com/openharmony/docs/blob/m ### 内容写作 -概述模板链接:[https](https://gitee.com/openharmony/docs/blob/master/zh-cn/contribute/template/concept-overview-template.md)[://gitee.com/openharmony/docs/blob/master/](https://gitee.com/openharmony/docs/blob/master/zh-cn/contribute/template/concept-overview-template.md)[zh-cn](https://gitee.com/openharmony/docs/blob/master/zh-cn/contribute/template/concept-overview-template.md)[/contribute/template/concept-overview-template.md](https://gitee.com/openharmony/docs/blob/master/zh-cn/contribute/template/concept-overview-template.md) +概述模板链接:https://gitee.com/openharmony/docs/blob/master/zh-cn/contribute/template/concept-overview-template.md -开发指导模板链接:[https://](https://gitee.com/openharmony/docs/blob/master/zh-cn/contribute/template/guide-template.md)[gitee.com/openharmony/docs/blob/master/zh-cn/contribute/template/guide-template.md](https://gitee.com/openharmony/docs/blob/master/zh-cn/contribute/template/guide-template.md) +开发指导模板链接:https://gitee.com/openharmony/docs/blob/master/zh-cn/contribute/template/guide-template.md **每一个文档必须包含的内容:** @@ -191,8 +192,8 @@ JS API 文档模板路径:[https://](https://gitee.com/openharmony/docs/blob/m 1. 概述写作示例: - ![](figures\figure11.png) + ![](figures/figure11.png) 2. 开发指导步骤写作示例: - ![](figures\figure12.png) + ![](figures/figure12.png)