Describe the parameter definitions of functions and API, which is useful for writing documentation.
Become a backer or sponsor to support our work.
1{{% params [data] %}}
data| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
data | - | string | ✓ | - | - | - |
The data filename.
heading| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
heading | - | string | - | Parameters | - | - |
The heading.
headingStartLevel| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
headingStartLevel | - | number | - | 2 | - | - |
The heading start level.
context| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
context | - | string | - | - | 0.20.0 | - |
The default context for all parameters.
name| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
name | - | string | ✓ | - | - | - |
The parameter name.
type| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
type | - | string/array | - | string | - | - |
The type of parameter.
required| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
required | - | boolean | - | false | - | - |
Indicates whether if the parameter is required.
default| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
default | - | string | - | - | - | - |
The default value of parameter.
since| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
since | - | string | - | - | - | - |
Indicates the version in which the parameter is added.
description| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
description | - | string/object | ✓ | - | - | - |
The description, support Markdown.
description.default| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
description.default | - | string | - | - | - | - |
The default description.
description.[lang]| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
description.[lang] | - | string | - | - | - | - |
Language-specific description.
options| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
options | - | array | - | - | - | - |
Available options.
deprecated| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
deprecated | - | string | - | false | - | - |
Indicates whether if the parameter is deprecated.
1- name: foo
2 required: true
3 description:
4 default: Foo description.
5 zh-hans: Foo 描述。
6 zh-hant: Foo 描述。
7
8- name: bar
9 type: number
10 since: v0.2.0
11 deprecated: true
12 description:
13 default: Bar description.
14 zh-hans: Bar 描述。
15 zh-hant: Bar 描述。
16
17- name: fizz
18 description: Single description without translations.
19 options:
20 - one
21 - two
Result as follows.
1{{% params data="data/example-params.yaml" heading="Example Parameters" headingStartLevel=3 %}}foo| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
foo | - | string | ✓ | - | - | - |
Foo description.
bar| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
bar | - | number | - | - | v0.2.0 | - |
Bar description.
fizz| Name | Context | Type | Required | Default | Since | Example |
|---|---|---|---|---|---|---|
fizz | - | string | - | - | - | - |
Single description without translations.
Available options: one, two.