@docusaurus/plugin-content-pages 0.0.0-5044 → 0.0.0-5049
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.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/markdownLoader.js +1 -1
- package/package.json +7 -7
- package/src/index.ts +2 -2
- package/src/markdownLoader.ts +1 -1
- package/src/options.ts +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ import type { LoadContext, Plugin } from '@docusaurus/types';
|
|
|
8
8
|
import type { PagesContentPaths } from './types';
|
|
9
9
|
import type { PluginOptions, LoadedContent } from '@docusaurus/plugin-content-pages';
|
|
10
10
|
export declare function getContentPathList(contentPaths: PagesContentPaths): string[];
|
|
11
|
-
export default function pluginContentPages(context: LoadContext, options: PluginOptions):
|
|
11
|
+
export default function pluginContentPages(context: LoadContext, options: PluginOptions): Plugin<LoadedContent | null>;
|
|
12
12
|
export { validateOptions } from './options';
|
package/lib/index.js
CHANGED
|
@@ -18,7 +18,7 @@ function getContentPathList(contentPaths) {
|
|
|
18
18
|
}
|
|
19
19
|
exports.getContentPathList = getContentPathList;
|
|
20
20
|
const isMarkdownSource = (source) => source.endsWith('.md') || source.endsWith('.mdx');
|
|
21
|
-
|
|
21
|
+
function pluginContentPages(context, options) {
|
|
22
22
|
if (options.admonitions) {
|
|
23
23
|
options.remarkPlugins = options.remarkPlugins.concat([
|
|
24
24
|
[remark_admonitions_1.default, options.admonitions],
|
package/lib/markdownLoader.js
CHANGED
|
@@ -11,6 +11,6 @@ function markdownLoader(fileString) {
|
|
|
11
11
|
// const options = this.getOptions();
|
|
12
12
|
// TODO provide additional md processing here? like interlinking pages?
|
|
13
13
|
// fileString = linkify(fileString)
|
|
14
|
-
return callback
|
|
14
|
+
return callback(null, fileString);
|
|
15
15
|
}
|
|
16
16
|
exports.default = markdownLoader;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-content-pages",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-5049",
|
|
4
4
|
"description": "Pages plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/plugin-content-pages.d.ts",
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@docusaurus/core": "0.0.0-
|
|
22
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
23
|
-
"@docusaurus/utils": "0.0.0-
|
|
24
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
21
|
+
"@docusaurus/core": "0.0.0-5049",
|
|
22
|
+
"@docusaurus/mdx-loader": "0.0.0-5049",
|
|
23
|
+
"@docusaurus/utils": "0.0.0-5049",
|
|
24
|
+
"@docusaurus/utils-validation": "0.0.0-5049",
|
|
25
25
|
"fs-extra": "^10.1.0",
|
|
26
26
|
"remark-admonitions": "^1.2.1",
|
|
27
27
|
"tslib": "^2.4.0",
|
|
28
28
|
"webpack": "^5.72.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@docusaurus/types": "0.0.0-
|
|
31
|
+
"@docusaurus/types": "0.0.0-5049"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": "^16.8.4 || ^17.0.0",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"engines": {
|
|
38
38
|
"node": ">=14"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "527b2a01c46b67483327a1a6873fccf81bc19e2c"
|
|
41
41
|
}
|
package/src/index.ts
CHANGED
|
@@ -39,10 +39,10 @@ export function getContentPathList(contentPaths: PagesContentPaths): string[] {
|
|
|
39
39
|
const isMarkdownSource = (source: string) =>
|
|
40
40
|
source.endsWith('.md') || source.endsWith('.mdx');
|
|
41
41
|
|
|
42
|
-
export default
|
|
42
|
+
export default function pluginContentPages(
|
|
43
43
|
context: LoadContext,
|
|
44
44
|
options: PluginOptions,
|
|
45
|
-
):
|
|
45
|
+
): Plugin<LoadedContent | null> {
|
|
46
46
|
if (options.admonitions) {
|
|
47
47
|
options.remarkPlugins = options.remarkPlugins.concat([
|
|
48
48
|
[admonitions, options.admonitions],
|
package/src/markdownLoader.ts
CHANGED
package/src/options.ts
CHANGED
|
@@ -28,7 +28,7 @@ export const DEFAULT_OPTIONS: PluginOptions = {
|
|
|
28
28
|
admonitions: {},
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
const PluginOptionSchema = Joi.object({
|
|
31
|
+
const PluginOptionSchema = Joi.object<PluginOptions>({
|
|
32
32
|
path: Joi.string().default(DEFAULT_OPTIONS.path),
|
|
33
33
|
routeBasePath: Joi.string().default(DEFAULT_OPTIONS.routeBasePath),
|
|
34
34
|
include: Joi.array().items(Joi.string()).default(DEFAULT_OPTIONS.include),
|