@docusaurus/plugin-sitemap 0.0.0-4945 → 0.0.0-4951
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/createSitemap.d.ts +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/options.d.ts +13 -1
- package/package.json +8 -8
- package/src/createSitemap.ts +2 -2
- package/src/index.ts +2 -1
- package/src/options.ts +14 -1
- package/src/plugin-sitemap.d.ts +0 -22
package/lib/createSitemap.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
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 { PluginOptions } from '@docusaurus/plugin-sitemap';
|
|
8
7
|
import type { DocusaurusConfig } from '@docusaurus/types';
|
|
9
8
|
import type { HelmetServerState } from 'react-helmet-async';
|
|
9
|
+
import type { PluginOptions } from './options';
|
|
10
10
|
export default function createSitemap(siteConfig: DocusaurusConfig, routesPaths: string[], head: {
|
|
11
11
|
[location: string]: HelmetServerState;
|
|
12
12
|
}, options: PluginOptions): Promise<string>;
|
package/lib/index.d.ts
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
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 { PluginOptions } from '
|
|
7
|
+
import type { PluginOptions, Options } from './options';
|
|
8
8
|
import type { LoadContext, Plugin } from '@docusaurus/types';
|
|
9
9
|
export default function pluginSitemap(context: LoadContext, options: PluginOptions): Plugin<void>;
|
|
10
10
|
export { validateOptions } from './options';
|
|
11
|
+
export type { PluginOptions, Options };
|
package/lib/options.d.ts
CHANGED
|
@@ -4,7 +4,19 @@
|
|
|
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
|
|
7
|
+
import { EnumChangefreq } from 'sitemap';
|
|
8
8
|
import type { OptionValidationContext } from '@docusaurus/types';
|
|
9
|
+
export declare type PluginOptions = {
|
|
10
|
+
/** @see https://www.sitemaps.org/protocol.html#xmlTagDefinitions */
|
|
11
|
+
changefreq: EnumChangefreq;
|
|
12
|
+
/** @see https://www.sitemaps.org/protocol.html#xmlTagDefinitions */
|
|
13
|
+
priority: number;
|
|
14
|
+
/**
|
|
15
|
+
* A list of glob patterns; matching route paths will be filtered from the
|
|
16
|
+
* sitemap. Note that you may need to include the base URL in here.
|
|
17
|
+
*/
|
|
18
|
+
ignorePatterns: string[];
|
|
19
|
+
};
|
|
20
|
+
export declare type Options = Partial<PluginOptions>;
|
|
9
21
|
export declare const DEFAULT_OPTIONS: PluginOptions;
|
|
10
22
|
export declare function validateOptions({ validate, options, }: OptionValidationContext<Options, PluginOptions>): PluginOptions;
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-sitemap",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-4951",
|
|
4
4
|
"description": "Simple sitemap generation plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
|
-
"types": "
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc",
|
|
9
9
|
"watch": "tsc --watch"
|
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@docusaurus/core": "0.0.0-
|
|
22
|
-
"@docusaurus/utils": "0.0.0-
|
|
23
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
24
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
21
|
+
"@docusaurus/core": "0.0.0-4951",
|
|
22
|
+
"@docusaurus/utils": "0.0.0-4951",
|
|
23
|
+
"@docusaurus/utils-common": "0.0.0-4951",
|
|
24
|
+
"@docusaurus/utils-validation": "0.0.0-4951",
|
|
25
25
|
"fs-extra": "^10.1.0",
|
|
26
26
|
"sitemap": "^7.1.1",
|
|
27
27
|
"tslib": "^2.4.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@docusaurus/types": "0.0.0-
|
|
30
|
+
"@docusaurus/types": "0.0.0-4951"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"react": "^16.8.4 || ^17.0.0",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"engines": {
|
|
37
37
|
"node": ">=14"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "d3321f8bb35b07061d37fffea81392b0cd3b63ed"
|
|
40
40
|
}
|
package/src/createSitemap.ts
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import {SitemapStream, streamToPromise} from 'sitemap';
|
|
9
|
-
import type {PluginOptions} from '@docusaurus/plugin-sitemap';
|
|
10
|
-
import type {DocusaurusConfig} from '@docusaurus/types';
|
|
11
9
|
import {applyTrailingSlash} from '@docusaurus/utils-common';
|
|
12
10
|
import {createMatcher} from '@docusaurus/utils';
|
|
11
|
+
import type {DocusaurusConfig} from '@docusaurus/types';
|
|
13
12
|
import type {HelmetServerState} from 'react-helmet-async';
|
|
13
|
+
import type {PluginOptions} from './options';
|
|
14
14
|
import type {ReactElement} from 'react';
|
|
15
15
|
|
|
16
16
|
export default async function createSitemap(
|
package/src/index.ts
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import fs from 'fs-extra';
|
|
9
9
|
import path from 'path';
|
|
10
|
-
import type {PluginOptions} from '@docusaurus/plugin-sitemap';
|
|
11
10
|
import createSitemap from './createSitemap';
|
|
11
|
+
import type {PluginOptions, Options} from './options';
|
|
12
12
|
import type {LoadContext, Plugin} from '@docusaurus/types';
|
|
13
13
|
|
|
14
14
|
export default function pluginSitemap(
|
|
@@ -42,3 +42,4 @@ export default function pluginSitemap(
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
export {validateOptions} from './options';
|
|
45
|
+
export type {PluginOptions, Options};
|
package/src/options.ts
CHANGED
|
@@ -7,9 +7,22 @@
|
|
|
7
7
|
|
|
8
8
|
import {Joi} from '@docusaurus/utils-validation';
|
|
9
9
|
import {EnumChangefreq} from 'sitemap';
|
|
10
|
-
import type {Options, PluginOptions} from '@docusaurus/plugin-sitemap';
|
|
11
10
|
import type {OptionValidationContext} from '@docusaurus/types';
|
|
12
11
|
|
|
12
|
+
export type PluginOptions = {
|
|
13
|
+
/** @see https://www.sitemaps.org/protocol.html#xmlTagDefinitions */
|
|
14
|
+
changefreq: EnumChangefreq;
|
|
15
|
+
/** @see https://www.sitemaps.org/protocol.html#xmlTagDefinitions */
|
|
16
|
+
priority: number;
|
|
17
|
+
/**
|
|
18
|
+
* A list of glob patterns; matching route paths will be filtered from the
|
|
19
|
+
* sitemap. Note that you may need to include the base URL in here.
|
|
20
|
+
*/
|
|
21
|
+
ignorePatterns: string[];
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type Options = Partial<PluginOptions>;
|
|
25
|
+
|
|
13
26
|
export const DEFAULT_OPTIONS: PluginOptions = {
|
|
14
27
|
changefreq: EnumChangefreq.WEEKLY,
|
|
15
28
|
priority: 0.5,
|
package/src/plugin-sitemap.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import type {EnumChangefreq} from 'sitemap';
|
|
9
|
-
|
|
10
|
-
export type PluginOptions = {
|
|
11
|
-
/** @see https://www.sitemaps.org/protocol.html#xmlTagDefinitions */
|
|
12
|
-
changefreq: EnumChangefreq;
|
|
13
|
-
/** @see https://www.sitemaps.org/protocol.html#xmlTagDefinitions */
|
|
14
|
-
priority: number;
|
|
15
|
-
/**
|
|
16
|
-
* A list of glob patterns; matching route paths will be filtered from the
|
|
17
|
-
* sitemap. Note that you may need to include the base URL in here.
|
|
18
|
-
*/
|
|
19
|
-
ignorePatterns: string[];
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export type Options = Partial<PluginOptions>;
|