Files
BitLogger/docs/api/.example.md
T
2026-05-12 13:32:15 +08:00

2.3 KiB

name, group, category, update-time, description, key-word
name group category update-time description key-word
example-api dev example-group 20260512 An example API file to show how to write API doc.
example
async
sync
public
doc

ONE API ONE FILE

Example-api-name

long discription.

Interface

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.

Use<! --The content packaged with -->does 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 ...:

impl

In this example, will .

And .

...

Error Case

e.g.:

  • If target is empty, returns a predicate that always evaluates to false.

  • ...

...

Notes

  1. ...

  2. ...

...


API MARKDOWN YAML HEADER

This just is an example, --- in fact has yaml grammer error.

---
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 ##### ...