@docusaurus/plugin-content-pages 4.0.0-canary-6888 → 4.0.0-canary-6892
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/content.js +1 -2
- package/package.json +9 -9
- package/src/content.ts +2 -3
package/lib/content.js
CHANGED
|
@@ -9,7 +9,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.createPagesContentPaths = createPagesContentPaths;
|
|
10
10
|
exports.loadPagesContent = loadPagesContent;
|
|
11
11
|
const tslib_1 = require("tslib");
|
|
12
|
-
const promises_1 = tslib_1.__importDefault(require("node:fs/promises"));
|
|
13
12
|
const node_path_1 = tslib_1.__importDefault(require("node:path"));
|
|
14
13
|
const utils_1 = require("@docusaurus/utils");
|
|
15
14
|
const glob_1 = require("@docusaurus/glob");
|
|
@@ -68,7 +67,7 @@ async function processPageSourceFile(relativeSource, params) {
|
|
|
68
67
|
source: aliasedSourcePath,
|
|
69
68
|
};
|
|
70
69
|
}
|
|
71
|
-
const content = await
|
|
70
|
+
const content = await fs_1.fs.readFile(source, 'utf-8');
|
|
72
71
|
const { frontMatter: unsafeFrontMatter, contentTitle, excerpt, } = await (0, utils_1.parseMarkdownFile)({
|
|
73
72
|
filePath: source,
|
|
74
73
|
fileContent: content,
|
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-6892",
|
|
4
4
|
"description": "Pages plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/plugin-content-pages.d.ts",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@docusaurus/core": "4.0.0-canary-
|
|
22
|
-
"@docusaurus/fs": "4.0.0-canary-
|
|
23
|
-
"@docusaurus/glob": "4.0.0-canary-
|
|
24
|
-
"@docusaurus/mdx-loader": "4.0.0-canary-
|
|
25
|
-
"@docusaurus/types": "4.0.0-canary-
|
|
26
|
-
"@docusaurus/utils": "4.0.0-canary-
|
|
27
|
-
"@docusaurus/utils-validation": "4.0.0-canary-
|
|
21
|
+
"@docusaurus/core": "4.0.0-canary-6892",
|
|
22
|
+
"@docusaurus/fs": "4.0.0-canary-6892",
|
|
23
|
+
"@docusaurus/glob": "4.0.0-canary-6892",
|
|
24
|
+
"@docusaurus/mdx-loader": "4.0.0-canary-6892",
|
|
25
|
+
"@docusaurus/types": "4.0.0-canary-6892",
|
|
26
|
+
"@docusaurus/utils": "4.0.0-canary-6892",
|
|
27
|
+
"@docusaurus/utils-validation": "4.0.0-canary-6892",
|
|
28
28
|
"tslib": "^2.8.1",
|
|
29
29
|
"webpack": "^5.111.0"
|
|
30
30
|
},
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=24.21"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "a28eee9700a9a7eab87344e7144546bfd0b57961"
|
|
39
39
|
}
|
package/src/content.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import fs from 'node:fs/promises';
|
|
9
8
|
import path from 'node:path';
|
|
10
9
|
import {
|
|
11
10
|
encodePath,
|
|
@@ -25,7 +24,7 @@ import {
|
|
|
25
24
|
type ContentPaths,
|
|
26
25
|
} from '@docusaurus/utils';
|
|
27
26
|
import {glob} from '@docusaurus/glob';
|
|
28
|
-
import {
|
|
27
|
+
import {fs} from '@docusaurus/fs';
|
|
29
28
|
import {validatePageFrontMatter} from './frontMatter';
|
|
30
29
|
import type {LoadContext} from '@docusaurus/types';
|
|
31
30
|
import type {
|
|
@@ -124,7 +123,7 @@ async function processPageSourceFile(
|
|
|
124
123
|
};
|
|
125
124
|
}
|
|
126
125
|
|
|
127
|
-
const content = await
|
|
126
|
+
const content = await fs.readFile(source, 'utf-8');
|
|
128
127
|
const {
|
|
129
128
|
frontMatter: unsafeFrontMatter,
|
|
130
129
|
contentTitle,
|