--- name: example-api group: dev category: example-group update-time: 20260512 description: An example API file to show how to write API doc. key-word: - example - async - sync - public - doc --- **ONE API ONE FILE** ## Example-api-name long discription. ### Interface ```moonbit pub fn function_name(input) -> output {} ``` #### input - `args : type` - Explain #### output - `output : type` - Explain --- > `---` Just when interface has double or more write. Used to separate two different APIs. > Usedoes not actually need to be written in the official document, it is only used as an example for reference. It is not necessary to write the complete function implementation. ### Explanation Detailed rules explaining key parameters and behaviors - ... ### How to Use Here are some specific examples provided. e.g.: #### > title like: `#### When Need Colorful Formatter` When sometime ...: ```moonbit impl ``` In this example, will . And . #### ... ### Error Case e.g.: - If `target` is empty, returns a predicate that always evaluates to false. - ... ... ### Notes Notes are here. 1. ... 2. ... 3. ... 4. ... ... --- ## API MARKDOWN YAML HEADER > This just is an example, `---` in fact has yaml grammer error. ```yaml --- name: example-api group: dev category: example-group update-time: 20260512 description: An example API file to show how to write API doc. key-word: - example - async - sync - public - doc --- ``` It has 6 key: - `name` - short and clear api name - `group` - in static doc template site will use this key to render how to fold and group - `category` - fastly search category in repo and will be used in template site - `update-time` - full number use YYYYMMdd(year, month, day) - `discription` - short discription - `key-word` - use 2~5 key-words to help user fastly search ## Title Capitalization Standards NO `# ...` - `## ...` use `Abcd` - `### ...` use `Abcd` - `#### ...` use `abcd` NO `##### ...`