Docs
Args
Last modified on June 23, 2025 • 4 min read • 751 wordsUse the args shortcode to generates a table of structured arguments.
Overview
Use the args shortcode to generates a table of structured arguments. The argument definitions are expected to be defined in a data file identified by a provided structure name.
Name | Type | Required | Default | Comment |
---|---|---|---|---|
group | string | Name of the group filter. This is typically used when a shortcode and partial have common arguments. The group filter binds a specific argument to a particular group. By default, an argument belongs to all groups. | ||
header-level | int | 3 |
v1.0.0
The header level to use for the user-defined type headers. Supported values: [1 - 6 ]. |
|
page | *hugolib.pageState, *hugolib.pageForRenderHooks, *hugolib.pageForShortcode | yes | Context of the current page. | |
parent | bool | Flag to filter only arguments that have a parent attribute (either cascade or merge ). |
||
render-type | select | both |
v1.0.0
Option whether to render arguments, user-defined types, or both. Please note that the arguments will render a link to a user-defined type in any case. Supported values: [arguments , types , both ]. |
|
structure | string | yes | Name of the data file that contains argument definitions. Supported data formats include JSON, TOML, YAML, and XML. You can omit the file extension. The file should reside in the data/structures folder. For bookshop components, add the bookshop- prefix to the structure name. |
Name | Type | Required | Default |
---|---|---|---|
group | string | ||
Name of the group filter. This is typically used when a shortcode and partial have common arguments. The group filter binds a specific argument to a particular group. By default, an argument belongs to all groups. | |||
header-level | int | 3 |
|
v1.0.0
The header level to use for the user-defined type headers. Supported values: [1 - 6 ]. |
|||
page | *hugolib.pageState, *hugolib.pageForRenderHooks, *hugolib.pageForShortcode | yes | |
Context of the current page. | |||
parent | bool | ||
Flag to filter only arguments that have a parent attribute (either cascade or merge ). |
|||
render-type | select | both |
|
v1.0.0
Option whether to render arguments, user-defined types, or both. Please note that the arguments will render a link to a user-defined type in any case. Supported values: [arguments , types , both ]. |
|||
structure | string | yes | |
Name of the data file that contains argument definitions. Supported data formats include JSON, TOML, YAML, and XML. You can omit the file extension. The file should reside in the data/structures folder. For bookshop components, add the bookshop- prefix to the structure name. |
markdown
{{< args "args" >}}
Arguments
The shortcode supports both unnamed and named arguments.
Name | Type | Required | Default | Comment |
---|---|---|---|---|
group | string | Name of the group filter. This is typically used when a shortcode and partial have common arguments. The group filter binds a specific argument to a particular group. By default, an argument belongs to all groups. | ||
header-level | int | 3 |
v1.0.0
The header level to use for the user-defined type headers. Supported values: [1 - 6 ]. |
|
page | *hugolib.pageState, *hugolib.pageForRenderHooks, *hugolib.pageForShortcode | yes | Context of the current page. | |
parent | bool | Flag to filter only arguments that have a parent attribute (either cascade or merge ). |
||
render-type | select | both |
v1.0.0
Option whether to render arguments, user-defined types, or both. Please note that the arguments will render a link to a user-defined type in any case. Supported values: [arguments , types , both ]. |
|
structure | string | yes | Name of the data file that contains argument definitions. Supported data formats include JSON, TOML, YAML, and XML. You can omit the file extension. The file should reside in the data/structures folder. For bookshop components, add the bookshop- prefix to the structure name. |
Name | Type | Required | Default |
---|---|---|---|
group | string | ||
Name of the group filter. This is typically used when a shortcode and partial have common arguments. The group filter binds a specific argument to a particular group. By default, an argument belongs to all groups. | |||
header-level | int | 3 |
|
v1.0.0
The header level to use for the user-defined type headers. Supported values: [1 - 6 ]. |
|||
page | *hugolib.pageState, *hugolib.pageForRenderHooks, *hugolib.pageForShortcode | yes | |
Context of the current page. | |||
parent | bool | ||
Flag to filter only arguments that have a parent attribute (either cascade or merge ). |
|||
render-type | select | both |
|
v1.0.0
Option whether to render arguments, user-defined types, or both. Please note that the arguments will render a link to a user-defined type in any case. Supported values: [arguments , types , both ]. |
|||
structure | string | yes | |
Name of the data file that contains argument definitions. Supported data formats include JSON, TOML, YAML, and XML. You can omit the file extension. The file should reside in the data/structures folder. For bookshop components, add the bookshop- prefix to the structure name. |
Data Format
Please refer to the Partial Development section to review the argument structure.