@docusaurus/plugin-content-pages 2.0.0-beta.18 → 2.0.0-beta.19
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 +2 -2
- package/lib/types.d.ts +0 -2
- package/package.json +10 -10
- package/src/index.ts +6 -2
- package/src/plugin-content-pages.d.ts +12 -9
- package/src/types.ts +0 -4
package/lib/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import type { LoadContext, Plugin } from '@docusaurus/types';
|
|
8
|
-
import type {
|
|
9
|
-
import type { PluginOptions } from '@docusaurus/plugin-content-pages';
|
|
8
|
+
import type { PagesContentPaths } from './types';
|
|
9
|
+
import type { PluginOptions, LoadedContent } from '@docusaurus/plugin-content-pages';
|
|
10
10
|
export declare function getContentPathList(contentPaths: PagesContentPaths): string[];
|
|
11
11
|
export default function pluginContentPages(context: LoadContext, options: PluginOptions): Promise<Plugin<LoadedContent | null>>;
|
|
12
12
|
export { validateOptions } from './options';
|
package/lib/types.d.ts
CHANGED
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import type { Metadata } from '@docusaurus/plugin-content-pages';
|
|
8
|
-
export declare type LoadedContent = Metadata[];
|
|
9
7
|
export declare type PagesContentPaths = {
|
|
10
8
|
contentPath: string;
|
|
11
9
|
contentPathLocalized: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-content-pages",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.19",
|
|
4
4
|
"description": "Pages plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/plugin-content-pages.d.ts",
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@docusaurus/core": "2.0.0-beta.
|
|
22
|
-
"@docusaurus/mdx-loader": "2.0.0-beta.
|
|
23
|
-
"@docusaurus/utils": "2.0.0-beta.
|
|
24
|
-
"@docusaurus/utils-validation": "2.0.0-beta.
|
|
25
|
-
"fs-extra": "^10.0
|
|
21
|
+
"@docusaurus/core": "2.0.0-beta.19",
|
|
22
|
+
"@docusaurus/mdx-loader": "2.0.0-beta.19",
|
|
23
|
+
"@docusaurus/utils": "2.0.0-beta.19",
|
|
24
|
+
"@docusaurus/utils-validation": "2.0.0-beta.19",
|
|
25
|
+
"fs-extra": "^10.1.0",
|
|
26
26
|
"remark-admonitions": "^1.2.1",
|
|
27
|
-
"tslib": "^2.
|
|
28
|
-
"webpack": "^5.
|
|
27
|
+
"tslib": "^2.4.0",
|
|
28
|
+
"webpack": "^5.72.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@docusaurus/types": "2.0.0-beta.
|
|
31
|
+
"@docusaurus/types": "2.0.0-beta.19"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"react": "^16.8.4 || ^17.0.0",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"engines": {
|
|
38
38
|
"node": ">=14"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "a71e60a49cce93c1006ef10c41ac03187f057102"
|
|
41
41
|
}
|
package/src/index.ts
CHANGED
|
@@ -25,8 +25,12 @@ import type {LoadContext, Plugin} from '@docusaurus/types';
|
|
|
25
25
|
import admonitions from 'remark-admonitions';
|
|
26
26
|
import {validatePageFrontMatter} from './frontMatter';
|
|
27
27
|
|
|
28
|
-
import type {
|
|
29
|
-
import type {
|
|
28
|
+
import type {PagesContentPaths} from './types';
|
|
29
|
+
import type {
|
|
30
|
+
PluginOptions,
|
|
31
|
+
Metadata,
|
|
32
|
+
LoadedContent,
|
|
33
|
+
} from '@docusaurus/plugin-content-pages';
|
|
30
34
|
|
|
31
35
|
export function getContentPathList(contentPaths: PagesContentPaths): string[] {
|
|
32
36
|
return [contentPaths.contentPathLocalized, contentPaths.contentPath];
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
declare module '@docusaurus/plugin-content-pages' {
|
|
9
|
-
import type {
|
|
9
|
+
import type {MDXOptions} from '@docusaurus/mdx-loader';
|
|
10
|
+
import type {LoadContext, Plugin} from '@docusaurus/types';
|
|
10
11
|
|
|
11
|
-
export type PluginOptions =
|
|
12
|
+
export type PluginOptions = MDXOptions & {
|
|
12
13
|
id?: string;
|
|
13
14
|
path: string;
|
|
14
15
|
routeBasePath: string;
|
|
@@ -45,22 +46,24 @@ declare module '@docusaurus/plugin-content-pages' {
|
|
|
45
46
|
};
|
|
46
47
|
|
|
47
48
|
export type Metadata = JSXPageMetadata | MDXPageMetadata;
|
|
49
|
+
|
|
50
|
+
export type LoadedContent = Metadata[];
|
|
51
|
+
|
|
52
|
+
export default function pluginContentPages(
|
|
53
|
+
context: LoadContext,
|
|
54
|
+
options: PluginOptions,
|
|
55
|
+
): Promise<Plugin<LoadedContent | null>>;
|
|
48
56
|
}
|
|
49
57
|
|
|
50
58
|
declare module '@theme/MDXPage' {
|
|
51
|
-
import type {
|
|
59
|
+
import type {LoadedMDXContent} from '@docusaurus/mdx-loader';
|
|
52
60
|
import type {
|
|
53
61
|
MDXPageMetadata,
|
|
54
62
|
FrontMatter,
|
|
55
63
|
} from '@docusaurus/plugin-content-pages';
|
|
56
64
|
|
|
57
65
|
export interface Props {
|
|
58
|
-
readonly content:
|
|
59
|
-
readonly frontMatter: FrontMatter;
|
|
60
|
-
readonly metadata: MDXPageMetadata;
|
|
61
|
-
readonly toc: readonly TOCItem[];
|
|
62
|
-
(): JSX.Element;
|
|
63
|
-
};
|
|
66
|
+
readonly content: LoadedMDXContent<FrontMatter, MDXPageMetadata>;
|
|
64
67
|
}
|
|
65
68
|
|
|
66
69
|
export default function MDXPage(props: Props): JSX.Element;
|
package/src/types.ts
CHANGED
|
@@ -5,10 +5,6 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type {Metadata} from '@docusaurus/plugin-content-pages';
|
|
9
|
-
|
|
10
|
-
export type LoadedContent = Metadata[];
|
|
11
|
-
|
|
12
8
|
export type PagesContentPaths = {
|
|
13
9
|
contentPath: string;
|
|
14
10
|
contentPathLocalized: string;
|