@docusaurus/types 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/config.d.ts +24 -1
- package/src/index.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/types",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Common types for Docusaurus packages.",
|
|
5
5
|
"types": "./src/index.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"react": "^16.8.4 || ^17.0.0",
|
|
27
27
|
"react-dom": "^16.8.4 || ^17.0.0"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "a308fb7c81832cca354192fe2984f52749441249"
|
|
30
30
|
}
|
package/src/config.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import type {RuleSetRule} from 'webpack';
|
|
9
9
|
import type {Required as RequireKeys, DeepPartial} from 'utility-types';
|
|
10
10
|
import type {I18nConfig} from './i18n';
|
|
11
|
-
import type {PluginConfig, PresetConfig} from './plugin';
|
|
11
|
+
import type {PluginConfig, PresetConfig, HtmlTagObject} from './plugin';
|
|
12
12
|
|
|
13
13
|
export type ReportingSeverity = 'ignore' | 'log' | 'warn' | 'throw';
|
|
14
14
|
|
|
@@ -16,6 +16,20 @@ export type ThemeConfig = {
|
|
|
16
16
|
[key: string]: unknown;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
+
export type MarkdownConfig = {
|
|
20
|
+
/**
|
|
21
|
+
* Allow mermaid language code blocks to be rendered into Mermaid diagrams:
|
|
22
|
+
*
|
|
23
|
+
* - `true`: code blocks with language mermaid will be rendered.
|
|
24
|
+
* - `false` | `undefined` (default): code blocks with language mermaid
|
|
25
|
+
* will be left as code blocks.
|
|
26
|
+
*
|
|
27
|
+
* @see https://docusaurus.io/docs/markdown-features/diagrams/
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
mermaid?: boolean;
|
|
31
|
+
};
|
|
32
|
+
|
|
19
33
|
/**
|
|
20
34
|
* Docusaurus config, after validation/normalization.
|
|
21
35
|
*/
|
|
@@ -192,6 +206,13 @@ export type DocusaurusConfig = {
|
|
|
192
206
|
* @default ["static"]
|
|
193
207
|
*/
|
|
194
208
|
staticDirectories: string[];
|
|
209
|
+
/**
|
|
210
|
+
* An array of tags that will be inserted in the HTML `<head>`.
|
|
211
|
+
*
|
|
212
|
+
* @see https://docusaurus.io/docs/api/docusaurus-config#head
|
|
213
|
+
* @default []
|
|
214
|
+
*/
|
|
215
|
+
headTags: HtmlTagObject[];
|
|
195
216
|
/**
|
|
196
217
|
* An array of scripts to load. The values can be either strings or plain
|
|
197
218
|
* objects of attribute-value maps. The `<script>` tags will be inserted in
|
|
@@ -270,6 +291,8 @@ export type DocusaurusConfig = {
|
|
|
270
291
|
*/
|
|
271
292
|
jsLoader: 'babel' | ((isServer: boolean) => RuleSetRule);
|
|
272
293
|
};
|
|
294
|
+
/** Markdown-related options. */
|
|
295
|
+
markdown: MarkdownConfig;
|
|
273
296
|
};
|
|
274
297
|
|
|
275
298
|
/**
|