We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
概述
正如该问题的评论中所示,一般来说,记录 YAML 所需的只是创建专门用于文档或元数据的 YAML 内容部分。
唯一值得注意的挑战是确定您是否希望您的文档部分符合用于记录代码的各种语法样式的约定(例如,Doxygen、NaturalDocs 等)。
解决这个问题领域有多种方法。本答案的“另请参阅”部分指出了替代方法。
示例
在 YAML 中创建元数据部分非常简单,您只需创建一个内联字符串即可将所有文档转储为单个块。
另请参阅
Overview
As it appears in the comments to the question, generally speaking, all that is necessary for documenting YAML is to create a section of the YAML content devoted specifically to documentation or metadata.
The only noteworthy challenge is determining whether you want your documentation section to conform with the conventions of any of the various syntax-styles for documenting code (e.g., Doxygen, NaturalDocs, whatever).
There are various approaches to this problem domain. Alternate approaches are indicated in the "See also" section of this answer.
Example
Creating a metadata section in YAML is very straightforward, you can do it simply by creating an inline string where you dump all your documentation as a single block.
See also