@docusaurus/plugin-content-pages 4.0.0-canary-6815 → 4.0.0-canary-6817

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 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): Promise<Plugin<LoadedContent | null>>;
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
- async function pluginContentPages(context, options) {
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
- async function createPagesMDXLoaderRule() {
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 = await createPagesMDXLoaderRule();
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-6815",
3
+ "version": "4.0.0-canary-6817",
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-6815",
22
- "@docusaurus/mdx-loader": "4.0.0-canary-6815",
23
- "@docusaurus/types": "4.0.0-canary-6815",
24
- "@docusaurus/utils": "4.0.0-canary-6815",
25
- "@docusaurus/utils-validation": "4.0.0-canary-6815",
21
+ "@docusaurus/core": "4.0.0-canary-6817",
22
+ "@docusaurus/mdx-loader": "4.0.0-canary-6817",
23
+ "@docusaurus/types": "4.0.0-canary-6817",
24
+ "@docusaurus/utils": "4.0.0-canary-6817",
25
+ "@docusaurus/utils-validation": "4.0.0-canary-6817",
26
26
  "fs-extra": "^11.4.0",
27
27
  "tslib": "^2.8.1",
28
28
  "webpack": "^5.111.0"
@@ -34,5 +34,5 @@
34
34
  "engines": {
35
35
  "node": ">=24.14"
36
36
  },
37
- "gitHead": "a97e3d800560e68eab32c029eb25bc532fb8b3d3"
37
+ "gitHead": "38c20529ba3a20243f31ce7a56764e969bf9ba7b"
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 async function pluginContentPages(
30
+ export default function pluginContentPages(
31
31
  context: LoadContext,
32
32
  options: PluginOptions,
33
- ): Promise<Plugin<LoadedContent | null>> {
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
- async function createPagesMDXLoaderRule(): Promise<RuleSetRule> {
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 = await createPagesMDXLoaderRule();
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
- ): Promise<Plugin<LoadedContent | null>>;
89
+ ): Plugin<LoadedContent | null>;
90
90
 
91
91
  export function validateOptions(
92
92
  args: OptionValidationContext<Options | undefined, PluginOptions>,