英文文档贡献指导

概述

本文旨在指导英文开发者贡献英文文档,相关规范与中文类似,均可参考文档贡献流程文档仓库目录结构说明_toc.yaml文件写作规范

英文文档目录结构

在 openEuler/docs 仓和 openEuler/SIG组名-docs 仓中,docs 目录下的 en 子目录,用于存放英文文档。docs/en 子目录下的目录结构与 docs/zh 子目录下目录结构相同:

docs/en下目录结构示例如下:

text
├─docs
│  ├─en
│  └─zh
│      ├─cloud
│      ├─EdgeComputing
│      ├─embedded
│      ├─Server
│      │  ├─Administration
│      │  ├─Development
│      │  ├─DiversifiedComputing
│      │  ├─HighAvailability
│      │  ├─InstallationUpgrade
│      │  ├─Maintenance
│      │  │  ├─A-Ops                <!-- 手册:《A-Ops 用户指南》 -->
│      │  │  ├─CommonSkills         <!-- 手册:《常用技能》 -->
│      │  │  ├─CommonTools          <!-- 手册:《常用定位定界工具》 -->
│      │  │  ├─Gala                 <!-- 手册:《gala 用户指南》 -->
│      │  │  ├─KernelLiveUpgrade    <!-- 手册:《内核热升级指南》 -->
│      │  │  ├─SysCare              <!-- 手册:《SysCare 用户指南》 -->
│      │  │  ├─sysmonitor           <!-- 手册:《sysmonitor 用户指南》 -->
│      │  │  └─Troubleshooting      <!-- 手册:《故障应急处理》 -->
│      │  ├─MemoryandStorage
│      │  ├─Network
│      │  ├─Performance
│      │  │  ├─CPUOptimization      <!-- 二级目录:CPU调优 -->
│      │  │  │  ├─KAE
│      │  │  │  └─sysBoost
│      │  │  ├─Overall              <!-- 二级目录:概述 -->
│      │  │  │  └─systemResource
│      │  │  ├─SystemOptimization   <!-- 二级目录:系统调优 -->
│      │  │  │  └─A-Tune
│      │  │  └─TuningFramework      <!-- 二级目录:调优框架 -->
│      │  │      └─oeAware
│      │  ├─Quickstart
│      │  ├─Releasenotes
|      |  ├─Security
│      │  └─_toc.yaml
│      ├─Tools
│      │  ├─AI
│      │  ├─Cloud
│      │  ├─CommunityTools
│      │  ├─desktop
│      │  ├─DevOps
│      │  ├─Maintenance
│      │  └─Security
│      └─virtualization

以手册《Kernel Live Upgrade Guide》手册为例,该手册包括三篇文档,存放在 Server/Maintenance/KernelLiveUpgrade 目录下:

  • Installation and Deployment,对应路径 /KernelLiveUpgrade/installation-and-deployment.md
  • How to Run,对应路径 /KernelLiveUpgrade/how-to-run.md
  • Common Problems and Solutions,对应路径 /KernelLiveUpgrade/common-problems-and-solutions.md
  • _toc.yaml 文件,对应路径 /KernelLiveUpgrade/_toc.yaml

注意:在 docs 仓存放的英文文档名和对应的中文文档名要保持一致。

_toc.yaml文件写作规范

英文文档与中文文档的_toc.yaml文件在格式设定和内容编排逻辑上保持一致,但需留意,“label” 和 “description” 这两项内容需依据语言不同分别采用英文和中文填写。

《Kernel Live Upgrade Guide》手册的_toc.yaml文件示例如下:

yaml
---
label: 'Kernel Live Upgrade Guide'
ismanual: 'Y'
description: 'Implement the kernel hot replacement feature by using user-space automation tools to quickly restart the kernel and perform program hot migration'
children:
  - label: 'Installation and Deployment'
    href: './installation-and-deployment.md'
  - label: 'How to Run'
    href: './how-to-run.md'
  - label: 'Common Problems and Solutions'
    href: './common-problems-and-solutions.md'
---
  • 顶层 label 指定手册名为“Kernel Live Upgrade Guide”。
  • ismanual 设为Y,标识这是一本手册。
  • description 指定该手册的简介说明。
  • children 下配置手册中的文档信息:
    • children 下的 label 指定文档的英文名称。
    • children 下的 href 指定文档地址。