@docusaurus/plugin-content-docs 0.0.0-4609 → 0.0.0-4610
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 +5 -0
- package/package.json +9 -9
- package/src/index.ts +10 -0
package/lib/index.js
CHANGED
|
@@ -236,6 +236,11 @@ async function pluginContentDocs(context, options) {
|
|
|
236
236
|
const aliasedPath = (0, utils_1.aliasedSitePath)(mdxPath, siteDir);
|
|
237
237
|
return path_1.default.join(dataDir, `${(0, utils_1.docuHash)(aliasedPath)}.json`);
|
|
238
238
|
},
|
|
239
|
+
// Assets allow to convert some relative images paths to
|
|
240
|
+
// require(...) calls
|
|
241
|
+
createAssets: ({ frontMatter, }) => ({
|
|
242
|
+
image: frontMatter.image,
|
|
243
|
+
}),
|
|
239
244
|
},
|
|
240
245
|
},
|
|
241
246
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-content-docs",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-4610",
|
|
4
4
|
"description": "Docs plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@docusaurus/core": "0.0.0-
|
|
27
|
-
"@docusaurus/logger": "0.0.0-
|
|
28
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
29
|
-
"@docusaurus/utils": "0.0.0-
|
|
30
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
26
|
+
"@docusaurus/core": "0.0.0-4610",
|
|
27
|
+
"@docusaurus/logger": "0.0.0-4610",
|
|
28
|
+
"@docusaurus/mdx-loader": "0.0.0-4610",
|
|
29
|
+
"@docusaurus/utils": "0.0.0-4610",
|
|
30
|
+
"@docusaurus/utils-validation": "0.0.0-4610",
|
|
31
31
|
"combine-promises": "^1.1.0",
|
|
32
32
|
"fs-extra": "^10.0.0",
|
|
33
33
|
"import-fresh": "^3.3.0",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"webpack": "^5.69.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
43
|
-
"@docusaurus/types": "0.0.0-
|
|
42
|
+
"@docusaurus/module-type-aliases": "0.0.0-4610",
|
|
43
|
+
"@docusaurus/types": "0.0.0-4610",
|
|
44
44
|
"@types/js-yaml": "^4.0.5",
|
|
45
45
|
"@types/picomatch": "^2.3.0",
|
|
46
46
|
"commander": "^5.1.0",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=14"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "3208d225c0366f7a46f6f9ecf622cf2e1f9a3018"
|
|
60
60
|
}
|
package/src/index.ts
CHANGED
|
@@ -38,6 +38,7 @@ import type {
|
|
|
38
38
|
DocFile,
|
|
39
39
|
DocsMarkdownOption,
|
|
40
40
|
VersionTag,
|
|
41
|
+
DocFrontMatter,
|
|
41
42
|
} from './types';
|
|
42
43
|
import type {RuleSetRule} from 'webpack';
|
|
43
44
|
import {cliDocsVersionCommand} from './cli';
|
|
@@ -360,6 +361,15 @@ export default async function pluginContentDocs(
|
|
|
360
361
|
const aliasedPath = aliasedSitePath(mdxPath, siteDir);
|
|
361
362
|
return path.join(dataDir, `${docuHash(aliasedPath)}.json`);
|
|
362
363
|
},
|
|
364
|
+
// Assets allow to convert some relative images paths to
|
|
365
|
+
// require(...) calls
|
|
366
|
+
createAssets: ({
|
|
367
|
+
frontMatter,
|
|
368
|
+
}: {
|
|
369
|
+
frontMatter: DocFrontMatter;
|
|
370
|
+
}) => ({
|
|
371
|
+
image: frontMatter.image,
|
|
372
|
+
}),
|
|
363
373
|
},
|
|
364
374
|
},
|
|
365
375
|
{
|