@docusaurus/plugin-content-blog 0.0.0-6067 → 0.0.0-6069

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 CHANGED
@@ -53,7 +53,8 @@ async function pluginContentBlog(context, options) {
53
53
  async function createBlogMDXLoaderRule() {
54
54
  const { admonitions, rehypePlugins, remarkPlugins, recmaPlugins, truncateMarker, beforeDefaultRemarkPlugins, beforeDefaultRehypePlugins, } = options;
55
55
  const contentDirs = (0, utils_1.getContentPathList)(contentPaths);
56
- const loaderOptions = {
56
+ const mdxLoaderItem = await (0, mdx_loader_1.createMDXLoaderItem)({
57
+ useCrossCompilerCache: siteConfig.future.experimental_faster.mdxCrossCompilerCache,
57
58
  admonitions,
58
59
  remarkPlugins,
59
60
  rehypePlugins,
@@ -99,7 +100,7 @@ async function pluginContentBlog(context, options) {
99
100
  }
100
101
  return permalink;
101
102
  },
102
- };
103
+ });
103
104
  function createBlogMarkdownLoader() {
104
105
  const markdownLoaderOptions = {
105
106
  truncateMarker,
@@ -114,10 +115,7 @@ async function pluginContentBlog(context, options) {
114
115
  include: contentDirs
115
116
  // Trailing slash is important, see https://github.com/facebook/docusaurus/pull/3970
116
117
  .map(utils_1.addTrailingPathSeparator),
117
- use: [
118
- await (0, mdx_loader_1.createMDXLoaderItem)(loaderOptions),
119
- createBlogMarkdownLoader(),
120
- ],
118
+ use: [mdxLoaderItem, createBlogMarkdownLoader()],
121
119
  };
122
120
  }
123
121
  const blogMDXLoaderRule = await createBlogMDXLoaderRule();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-content-blog",
3
- "version": "0.0.0-6067",
3
+ "version": "0.0.0-6069",
4
4
  "description": "Blog plugin for Docusaurus.",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/plugin-content-blog.d.ts",
@@ -31,14 +31,14 @@
31
31
  },
32
32
  "license": "MIT",
33
33
  "dependencies": {
34
- "@docusaurus/core": "0.0.0-6067",
35
- "@docusaurus/logger": "0.0.0-6067",
36
- "@docusaurus/mdx-loader": "0.0.0-6067",
37
- "@docusaurus/theme-common": "0.0.0-6067",
38
- "@docusaurus/types": "0.0.0-6067",
39
- "@docusaurus/utils": "0.0.0-6067",
40
- "@docusaurus/utils-common": "0.0.0-6067",
41
- "@docusaurus/utils-validation": "0.0.0-6067",
34
+ "@docusaurus/core": "0.0.0-6069",
35
+ "@docusaurus/logger": "0.0.0-6069",
36
+ "@docusaurus/mdx-loader": "0.0.0-6069",
37
+ "@docusaurus/theme-common": "0.0.0-6069",
38
+ "@docusaurus/types": "0.0.0-6069",
39
+ "@docusaurus/utils": "0.0.0-6069",
40
+ "@docusaurus/utils-common": "0.0.0-6069",
41
+ "@docusaurus/utils-validation": "0.0.0-6069",
42
42
  "cheerio": "1.0.0-rc.12",
43
43
  "feed": "^4.2.2",
44
44
  "fs-extra": "^11.1.1",
@@ -62,5 +62,5 @@
62
62
  "@total-typescript/shoehorn": "^0.1.2",
63
63
  "tree-node-cli": "^1.6.0"
64
64
  },
65
- "gitHead": "856911a5474e8e907f83438abe5c42d4793e06cb"
65
+ "gitHead": "7258877748d2a7c1682c5c92dae3a17734a7e59e"
66
66
  }
package/src/index.ts CHANGED
@@ -21,10 +21,7 @@ import {
21
21
  resolveMarkdownLinkPathname,
22
22
  } from '@docusaurus/utils';
23
23
  import {getTagsFilePathsToWatch} from '@docusaurus/utils-validation';
24
- import {
25
- createMDXLoaderItem,
26
- type Options as MDXLoaderOptions,
27
- } from '@docusaurus/mdx-loader';
24
+ import {createMDXLoaderItem} from '@docusaurus/mdx-loader';
28
25
  import {
29
26
  getBlogTags,
30
27
  paginateBlogPosts,
@@ -114,7 +111,9 @@ export default async function pluginContentBlog(
114
111
 
115
112
  const contentDirs = getContentPathList(contentPaths);
116
113
 
117
- const loaderOptions: MDXLoaderOptions = {
114
+ const mdxLoaderItem = await createMDXLoaderItem({
115
+ useCrossCompilerCache:
116
+ siteConfig.future.experimental_faster.mdxCrossCompilerCache,
118
117
  admonitions,
119
118
  remarkPlugins,
120
119
  rehypePlugins,
@@ -168,7 +167,7 @@ export default async function pluginContentBlog(
168
167
  }
169
168
  return permalink;
170
169
  },
171
- };
170
+ });
172
171
 
173
172
  function createBlogMarkdownLoader(): RuleSetUseItem {
174
173
  const markdownLoaderOptions: BlogMarkdownLoaderOptions = {
@@ -185,10 +184,7 @@ export default async function pluginContentBlog(
185
184
  include: contentDirs
186
185
  // Trailing slash is important, see https://github.com/facebook/docusaurus/pull/3970
187
186
  .map(addTrailingPathSeparator),
188
- use: [
189
- await createMDXLoaderItem(loaderOptions),
190
- createBlogMarkdownLoader(),
191
- ],
187
+ use: [mdxLoaderItem, createBlogMarkdownLoader()],
192
188
  };
193
189
  }
194
190