Skip to content

Commit fe89773

Browse files
committed
Recommend a JS config file for defining tags
1 parent 831c9f4 commit fe89773

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

site/tags.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,33 @@ the file **must** be placed alongside `tsconfig.json`. See the
8888
}
8989
```
9090

91+
When defining tags in a TypeDoc configuration file, it is recommended to use a JavaScript
92+
config file so that TypeDoc's default tag list can be easily extended.
93+
94+
```js
95+
// typedoc.config.mjs
96+
import { OptionDefaults } from "typedoc";
97+
/** @import { TypeDocOptions } from "typedoc" */
98+
99+
/** @type {TypeDocOptions} */
100+
const config = {
101+
blockTags: [
102+
...OptionDefaults.blockTags,
103+
"@customBlock",
104+
],
105+
modifierTags: [
106+
...OptionDefaults.modifierTags,
107+
"@customModifier",
108+
],
109+
inlineTags: [
110+
...OptionDefaults.inlineTags,
111+
"@customInline",
112+
],
113+
};
114+
115+
export default config;
116+
```
117+
91118
## Block Tags
92119

93120
Block tags are tags that are associated with the following text. They can be

0 commit comments

Comments
 (0)