@docusaurus/plugin-content-pages 4.0.0-canary-6816 → 4.0.0-canary-6818
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 +3 -3
- package/package.json +8 -8
- package/src/index.ts +4 -4
- package/src/plugin-content-pages.d.ts +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { LoadContext, Plugin } from '@docusaurus/types';
|
|
8
8
|
import type { PluginOptions, LoadedContent } from '@docusaurus/plugin-content-pages';
|
|
9
|
-
export default function pluginContentPages(context: LoadContext, options: PluginOptions):
|
|
9
|
+
export default function pluginContentPages(context: LoadContext, options: PluginOptions): Plugin<LoadedContent | null>;
|
|
10
10
|
export { validateOptions } from './options';
|
package/lib/index.js
CHANGED
|
@@ -16,13 +16,13 @@ const mdx_loader_1 = require("@docusaurus/mdx-loader");
|
|
|
16
16
|
const routes_1 = require("./routes");
|
|
17
17
|
const content_1 = require("./content");
|
|
18
18
|
const contentHelpers_1 = require("./contentHelpers");
|
|
19
|
-
|
|
19
|
+
function pluginContentPages(context, options) {
|
|
20
20
|
const { siteConfig, siteDir, generatedFilesDir } = context;
|
|
21
21
|
const contentPaths = (0, content_1.createPagesContentPaths)({ context, options });
|
|
22
22
|
const contentHelpers = (0, contentHelpers_1.createContentHelpers)();
|
|
23
23
|
const pluginDataDirRoot = path_1.default.join(generatedFilesDir, 'docusaurus-plugin-content-pages');
|
|
24
24
|
const dataDir = path_1.default.join(pluginDataDirRoot, options.id);
|
|
25
|
-
|
|
25
|
+
function createPagesMDXLoaderRule() {
|
|
26
26
|
const { admonitions, rehypePlugins, remarkPlugins, recmaPlugins, beforeDefaultRehypePlugins, beforeDefaultRemarkPlugins, } = options;
|
|
27
27
|
const contentDirs = (0, utils_1.getContentPathList)(contentPaths);
|
|
28
28
|
return (0, mdx_loader_1.createMDXLoaderRule)({
|
|
@@ -62,7 +62,7 @@ async function pluginContentPages(context, options) {
|
|
|
62
62
|
},
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
const pagesMDXLoaderRule =
|
|
65
|
+
const pagesMDXLoaderRule = createPagesMDXLoaderRule();
|
|
66
66
|
return {
|
|
67
67
|
name: 'docusaurus-plugin-content-pages',
|
|
68
68
|
getPathsToWatch() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-content-pages",
|
|
3
|
-
"version": "4.0.0-canary-
|
|
3
|
+
"version": "4.0.0-canary-6818",
|
|
4
4
|
"description": "Pages plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/plugin-content-pages.d.ts",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@docusaurus/core": "4.0.0-canary-
|
|
22
|
-
"@docusaurus/mdx-loader": "4.0.0-canary-
|
|
23
|
-
"@docusaurus/types": "4.0.0-canary-
|
|
24
|
-
"@docusaurus/utils": "4.0.0-canary-
|
|
25
|
-
"@docusaurus/utils-validation": "4.0.0-canary-
|
|
21
|
+
"@docusaurus/core": "4.0.0-canary-6818",
|
|
22
|
+
"@docusaurus/mdx-loader": "4.0.0-canary-6818",
|
|
23
|
+
"@docusaurus/types": "4.0.0-canary-6818",
|
|
24
|
+
"@docusaurus/utils": "4.0.0-canary-6818",
|
|
25
|
+
"@docusaurus/utils-validation": "4.0.0-canary-6818",
|
|
26
26
|
"fs-extra": "^11.4.0",
|
|
27
27
|
"tslib": "^2.8.1",
|
|
28
28
|
"webpack": "^5.111.0"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"react-dom": "^19.3.0"
|
|
33
33
|
},
|
|
34
34
|
"engines": {
|
|
35
|
-
"node": ">=
|
|
35
|
+
"node": ">=26.9"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "13f9a5b71c2e68f83284a1f6e16aa551f7f0424e"
|
|
38
38
|
}
|
package/src/index.ts
CHANGED
|
@@ -27,10 +27,10 @@ import type {
|
|
|
27
27
|
} from '@docusaurus/plugin-content-pages';
|
|
28
28
|
import type {RuleSetRule} from 'webpack';
|
|
29
29
|
|
|
30
|
-
export default
|
|
30
|
+
export default function pluginContentPages(
|
|
31
31
|
context: LoadContext,
|
|
32
32
|
options: PluginOptions,
|
|
33
|
-
):
|
|
33
|
+
): Plugin<LoadedContent | null> {
|
|
34
34
|
const {siteConfig, siteDir, generatedFilesDir} = context;
|
|
35
35
|
|
|
36
36
|
const contentPaths = createPagesContentPaths({context, options});
|
|
@@ -42,7 +42,7 @@ export default async function pluginContentPages(
|
|
|
42
42
|
);
|
|
43
43
|
const dataDir = path.join(pluginDataDirRoot, options.id);
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
function createPagesMDXLoaderRule(): RuleSetRule {
|
|
46
46
|
const {
|
|
47
47
|
admonitions,
|
|
48
48
|
rehypePlugins,
|
|
@@ -96,7 +96,7 @@ export default async function pluginContentPages(
|
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
const pagesMDXLoaderRule =
|
|
99
|
+
const pagesMDXLoaderRule = createPagesMDXLoaderRule();
|
|
100
100
|
|
|
101
101
|
return {
|
|
102
102
|
name: 'docusaurus-plugin-content-pages',
|
|
@@ -86,7 +86,7 @@ declare module '@docusaurus/plugin-content-pages' {
|
|
|
86
86
|
export default function pluginContentPages(
|
|
87
87
|
context: LoadContext,
|
|
88
88
|
options: PluginOptions,
|
|
89
|
-
):
|
|
89
|
+
): Plugin<LoadedContent | null>;
|
|
90
90
|
|
|
91
91
|
export function validateOptions(
|
|
92
92
|
args: OptionValidationContext<Options | undefined, PluginOptions>,
|