Headings options¤
heading
¤
- Type
str
""
A custom string to use as the heading of the root object (i.e. the object specified directly after the identifier :::
). This will override the default heading generated by the plugin. See also the toc_label
option.
Not advised to be used as a global configuration option
This option is not advised to be used as a global configuration option, as it will override the default heading for all objects. It is recommended to use it only in specific cases where you want to override the heading for a specific object.
::: @owner/package
options:
heading: "My fancy module"
heading_level
¤
- Type
int
2
The initial heading level to use.
When injecting documentation for an object, the object itself and its members are rendered. For each layer of objects, we increase the heading level by 1.
The initial heading level will be used for the first layer. If you set it to 3, then headings will start with <h3>
.
plugins:
- mkdocstrings:
default_handler: typescript
handlers:
typescript:
options:
heading_level: 2
::: @owner/package
options:
heading_level: 3
Preview
module
(3)
Docstring of the module.
ClassA
(4)
Docstring of class A.
ClassB
(4)
Docstring of class B.
method_1
(5)
Docstring of the method.
Docstring of the module.
ClassA
(3)
Docstring of class A.
ClassB
(3)
Docstring of class B.
method_1
(4)
Docstring of the method.
show_symbol_type_heading
¤
- Type
bool
False
Show the symbol type in headings.
This option will prefix headings with ,
,
,
,
,
,
,
,
,
,
,
,
,
,
or
types. See also
show_symbol_type_toc
.
To customize symbols, see Customizing symbol types.
plugins:
- mkdocstrings:
default_handler: typescript
handlers:
typescript:
options:
show_symbol_type_heading: true
::: @owner/package
options:
show_symbol_type_heading: false
Preview
foo
Docstring of the accessor.
foo
Docstring of the attribute.
Foo
Docstring of the class.
foo
Docstring of the constructor.
Foo
Docstring of the enum.
foo
Docstring of the enum member.
Foo
Docstring of the interface.
foo
Docstring of the method.
foo
Docstring of the module.
Foo
Docstring of the namespace.
foo
Docstring of the parameter.
foo
Docstring of the project.
foo
Docstring of the property.
Foo
Docstring of the type.
Foo
Docstring of the type alias.
foo
Docstring of the variable.
foo
Docstring of the accessor.
foo
Docstring of the attribute.
Foo
Docstring of the class.
foo
Docstring of the constructor.
foo
Docstring of the data.
Foo
Docstring of the enum.
foo
Docstring of the enum member.
Foo
Docstring of the interface.
foo
Docstring of the method.
foo
Docstring of the module.
Foo
Docstring of the namespace.
foo
Docstring of the parameter.
foo
Docstring of the project.
foo
Docstring of the property.
Foo
Docstring of the type.
Foo
Docstring of the type alias.
foo
Docstring of the variable.
show_symbol_type_toc
¤
- Type
bool
False
Show the symbol type in the Table of Contents.
This option will prefix items in the ToC with ,
,
,
,
,
,
,
,
,
,
,
,
,
,
or
types. See also
show_symbol_type_heading
.
To customize symbols, see Customizing symbol types.
plugins:
- mkdocstrings:
default_handler: typescript
handlers:
typescript:
options:
show_symbol_type_toc: true
::: @owner/package
options:
show_symbol_type_toc: false
Preview
foo
foo
Foo
foo
Foo
foo
Foo
foo
foo
Foo
foo
foo
foo
Foo
Foo
foo
- foo
- foo
- Foo
- foo
- foo
- Foo
- foo
- Foo
- foo
- foo
- Foo
- foo
- foo
- foo
- Foo
- Foo
- foo
toc_label
¤
- Type
str
""
A custom string to use as the label in the Table of Contents for the root object (i.e. the one specified directly after the identifier :::
). This will override the default label generated by the plugin. See also the heading
option.
Not advised to be used as a global configuration option
This option is not advised to be used as a global configuration option, as it will override the default label for all objects. It is recommended to use it only in specific cases where you want to override the label for a specific object.
Use with/without heading
If you use this option without specifying a custom heading
, the default heading will be used in the page, but the label in the Table of Contents will be the one you specified. By providing both an option for heading
and toc_label
, we leave the customization entirely up to you.
::: @owner/package
options:
heading: "My fancy package"
toc_label: "My fancy package"