@docusaurus/plugin-content-docs 0.0.0-5091 → 0.0.0-5094
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/lib/index.js +1 -0
- package/lib/options.js +2 -10
- package/package.json +9 -10
- package/src/index.ts +1 -0
- package/src/options.ts +2 -11
- package/src/plugin-content-docs.d.ts +0 -1
- package/src/deps.d.ts +0 -13
package/lib/index.js
CHANGED
package/lib/options.js
CHANGED
|
@@ -11,7 +11,6 @@ const tslib_1 = require("tslib");
|
|
|
11
11
|
const logger_1 = tslib_1.__importDefault(require("@docusaurus/logger"));
|
|
12
12
|
const utils_validation_1 = require("@docusaurus/utils-validation");
|
|
13
13
|
const utils_1 = require("@docusaurus/utils");
|
|
14
|
-
const remark_admonitions_1 = tslib_1.__importDefault(require("remark-admonitions"));
|
|
15
14
|
const generator_1 = require("./sidebars/generator");
|
|
16
15
|
const numberPrefix_1 = require("./numberPrefix");
|
|
17
16
|
exports.DEFAULT_OPTIONS = {
|
|
@@ -33,7 +32,7 @@ exports.DEFAULT_OPTIONS = {
|
|
|
33
32
|
beforeDefaultRehypePlugins: [],
|
|
34
33
|
showLastUpdateTime: false,
|
|
35
34
|
showLastUpdateAuthor: false,
|
|
36
|
-
admonitions:
|
|
35
|
+
admonitions: true,
|
|
37
36
|
includeCurrentVersion: true,
|
|
38
37
|
disableVersioning: false,
|
|
39
38
|
lastVersion: undefined,
|
|
@@ -90,9 +89,7 @@ const OptionsSchema = utils_validation_1.Joi.object({
|
|
|
90
89
|
rehypePlugins: utils_validation_1.RehypePluginsSchema.default(exports.DEFAULT_OPTIONS.rehypePlugins),
|
|
91
90
|
beforeDefaultRemarkPlugins: utils_validation_1.RemarkPluginsSchema.default(exports.DEFAULT_OPTIONS.beforeDefaultRemarkPlugins),
|
|
92
91
|
beforeDefaultRehypePlugins: utils_validation_1.RehypePluginsSchema.default(exports.DEFAULT_OPTIONS.beforeDefaultRehypePlugins),
|
|
93
|
-
admonitions: utils_validation_1.
|
|
94
|
-
.try(utils_validation_1.AdmonitionsSchema, utils_validation_1.Joi.boolean().invalid(true))
|
|
95
|
-
.default(exports.DEFAULT_OPTIONS.admonitions),
|
|
92
|
+
admonitions: utils_validation_1.AdmonitionsSchema.default(exports.DEFAULT_OPTIONS.admonitions),
|
|
96
93
|
showLastUpdateTime: utils_validation_1.Joi.bool().default(exports.DEFAULT_OPTIONS.showLastUpdateTime),
|
|
97
94
|
showLastUpdateAuthor: utils_validation_1.Joi.bool().default(exports.DEFAULT_OPTIONS.showLastUpdateAuthor),
|
|
98
95
|
includeCurrentVersion: utils_validation_1.Joi.bool().default(exports.DEFAULT_OPTIONS.includeCurrentVersion),
|
|
@@ -123,11 +120,6 @@ function validateOptions({ validate, options: userOptions, }) {
|
|
|
123
120
|
}
|
|
124
121
|
}
|
|
125
122
|
const normalizedOptions = validate(OptionsSchema, options);
|
|
126
|
-
if (normalizedOptions.admonitions) {
|
|
127
|
-
normalizedOptions.remarkPlugins = normalizedOptions.remarkPlugins.concat([
|
|
128
|
-
[remark_admonitions_1.default, normalizedOptions.admonitions],
|
|
129
|
-
]);
|
|
130
|
-
}
|
|
131
123
|
return normalizedOptions;
|
|
132
124
|
}
|
|
133
125
|
exports.validateOptions = validateOptions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-content-docs",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-5094",
|
|
4
4
|
"description": "Docs plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -25,20 +25,19 @@
|
|
|
25
25
|
},
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@docusaurus/core": "0.0.0-
|
|
29
|
-
"@docusaurus/logger": "0.0.0-
|
|
30
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
31
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
32
|
-
"@docusaurus/types": "0.0.0-
|
|
33
|
-
"@docusaurus/utils": "0.0.0-
|
|
34
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
28
|
+
"@docusaurus/core": "0.0.0-5094",
|
|
29
|
+
"@docusaurus/logger": "0.0.0-5094",
|
|
30
|
+
"@docusaurus/mdx-loader": "0.0.0-5094",
|
|
31
|
+
"@docusaurus/module-type-aliases": "0.0.0-5094",
|
|
32
|
+
"@docusaurus/types": "0.0.0-5094",
|
|
33
|
+
"@docusaurus/utils": "0.0.0-5094",
|
|
34
|
+
"@docusaurus/utils-validation": "0.0.0-5094",
|
|
35
35
|
"@types/react-router-config": "^5.0.6",
|
|
36
36
|
"combine-promises": "^1.1.0",
|
|
37
37
|
"fs-extra": "^10.1.0",
|
|
38
38
|
"import-fresh": "^3.3.0",
|
|
39
39
|
"js-yaml": "^4.1.0",
|
|
40
40
|
"lodash": "^4.17.21",
|
|
41
|
-
"remark-admonitions": "^1.2.1",
|
|
42
41
|
"tslib": "^2.4.0",
|
|
43
42
|
"utility-types": "^3.10.0",
|
|
44
43
|
"webpack": "^5.72.1"
|
|
@@ -59,5 +58,5 @@
|
|
|
59
58
|
"engines": {
|
|
60
59
|
"node": ">=16.14"
|
|
61
60
|
},
|
|
62
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "5ed0ed8f0a5918441c8b83093fd1975bfe7e0cfd"
|
|
63
62
|
}
|
package/src/index.ts
CHANGED
package/src/options.ts
CHANGED
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
URISchema,
|
|
15
15
|
} from '@docusaurus/utils-validation';
|
|
16
16
|
import {GlobExcludeDefault} from '@docusaurus/utils';
|
|
17
|
-
import admonitions from 'remark-admonitions';
|
|
18
17
|
import {DefaultSidebarItemsGenerator} from './sidebars/generator';
|
|
19
18
|
import {
|
|
20
19
|
DefaultNumberPrefixParser,
|
|
@@ -42,7 +41,7 @@ export const DEFAULT_OPTIONS: Omit<PluginOptions, 'id' | 'sidebarPath'> = {
|
|
|
42
41
|
beforeDefaultRehypePlugins: [],
|
|
43
42
|
showLastUpdateTime: false,
|
|
44
43
|
showLastUpdateAuthor: false,
|
|
45
|
-
admonitions:
|
|
44
|
+
admonitions: true,
|
|
46
45
|
includeCurrentVersion: true,
|
|
47
46
|
disableVersioning: false,
|
|
48
47
|
lastVersion: undefined,
|
|
@@ -123,9 +122,7 @@ const OptionsSchema = Joi.object<PluginOptions>({
|
|
|
123
122
|
beforeDefaultRehypePlugins: RehypePluginsSchema.default(
|
|
124
123
|
DEFAULT_OPTIONS.beforeDefaultRehypePlugins,
|
|
125
124
|
),
|
|
126
|
-
admonitions:
|
|
127
|
-
.try(AdmonitionsSchema, Joi.boolean().invalid(true))
|
|
128
|
-
.default(DEFAULT_OPTIONS.admonitions),
|
|
125
|
+
admonitions: AdmonitionsSchema.default(DEFAULT_OPTIONS.admonitions),
|
|
129
126
|
showLastUpdateTime: Joi.bool().default(DEFAULT_OPTIONS.showLastUpdateTime),
|
|
130
127
|
showLastUpdateAuthor: Joi.bool().default(
|
|
131
128
|
DEFAULT_OPTIONS.showLastUpdateAuthor,
|
|
@@ -167,11 +164,5 @@ export function validateOptions({
|
|
|
167
164
|
|
|
168
165
|
const normalizedOptions = validate(OptionsSchema, options);
|
|
169
166
|
|
|
170
|
-
if (normalizedOptions.admonitions) {
|
|
171
|
-
normalizedOptions.remarkPlugins = normalizedOptions.remarkPlugins.concat([
|
|
172
|
-
[admonitions, normalizedOptions.admonitions],
|
|
173
|
-
]);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
167
|
return normalizedOptions;
|
|
177
168
|
}
|
|
@@ -206,7 +206,6 @@ declare module '@docusaurus/plugin-content-docs' {
|
|
|
206
206
|
docTagsListComponent: string;
|
|
207
207
|
/** Root component of the generated category index page. */
|
|
208
208
|
docCategoryGeneratedIndexComponent: string;
|
|
209
|
-
admonitions: {[key: string]: unknown};
|
|
210
209
|
sidebarItemsGenerator: import('./sidebars/types').SidebarItemsGeneratorOption;
|
|
211
210
|
/**
|
|
212
211
|
* URL route for the tags section of your doc version. Will be appended to
|
package/src/deps.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
declare module 'remark-admonitions' {
|
|
9
|
-
type Options = {[key: string]: unknown};
|
|
10
|
-
|
|
11
|
-
const plugin: (options?: Options) => void;
|
|
12
|
-
export = plugin;
|
|
13
|
-
}
|