@docusaurus/plugin-sitemap 3.3.1 → 3.4.0
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 +6 -1
- package/package.json +8 -8
- package/src/index.ts +10 -1
package/lib/index.js
CHANGED
|
@@ -12,9 +12,14 @@ const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
|
12
12
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
13
13
|
const logger_1 = tslib_1.__importDefault(require("@docusaurus/logger"));
|
|
14
14
|
const createSitemap_1 = tslib_1.__importDefault(require("./createSitemap"));
|
|
15
|
+
const PluginName = 'docusaurus-plugin-sitemap';
|
|
15
16
|
function pluginSitemap(context, options) {
|
|
17
|
+
if (context.siteConfig.future.experimental_router === 'hash') {
|
|
18
|
+
logger_1.default.warn(`${PluginName} does not support the Hash Router and will be disabled.`);
|
|
19
|
+
return { name: PluginName };
|
|
20
|
+
}
|
|
16
21
|
return {
|
|
17
|
-
name:
|
|
22
|
+
name: PluginName,
|
|
18
23
|
async postBuild({ siteConfig, routes, outDir, head }) {
|
|
19
24
|
if (siteConfig.noIndex) {
|
|
20
25
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-sitemap",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Simple sitemap generation plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@docusaurus/core": "3.
|
|
22
|
-
"@docusaurus/logger": "3.
|
|
23
|
-
"@docusaurus/types": "3.
|
|
24
|
-
"@docusaurus/utils": "3.
|
|
25
|
-
"@docusaurus/utils-common": "3.
|
|
26
|
-
"@docusaurus/utils-validation": "3.
|
|
21
|
+
"@docusaurus/core": "3.4.0",
|
|
22
|
+
"@docusaurus/logger": "3.4.0",
|
|
23
|
+
"@docusaurus/types": "3.4.0",
|
|
24
|
+
"@docusaurus/utils": "3.4.0",
|
|
25
|
+
"@docusaurus/utils-common": "3.4.0",
|
|
26
|
+
"@docusaurus/utils-validation": "3.4.0",
|
|
27
27
|
"fs-extra": "^11.1.1",
|
|
28
28
|
"sitemap": "^7.1.1",
|
|
29
29
|
"tslib": "^2.6.0"
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=18.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "49e9a2143274a8dd795659b417b470bc42abbd6e"
|
|
42
42
|
}
|
package/src/index.ts
CHANGED
|
@@ -12,12 +12,21 @@ import createSitemap from './createSitemap';
|
|
|
12
12
|
import type {PluginOptions, Options} from './options';
|
|
13
13
|
import type {LoadContext, Plugin} from '@docusaurus/types';
|
|
14
14
|
|
|
15
|
+
const PluginName = 'docusaurus-plugin-sitemap';
|
|
16
|
+
|
|
15
17
|
export default function pluginSitemap(
|
|
16
18
|
context: LoadContext,
|
|
17
19
|
options: PluginOptions,
|
|
18
20
|
): Plugin<void> {
|
|
21
|
+
if (context.siteConfig.future.experimental_router === 'hash') {
|
|
22
|
+
logger.warn(
|
|
23
|
+
`${PluginName} does not support the Hash Router and will be disabled.`,
|
|
24
|
+
);
|
|
25
|
+
return {name: PluginName};
|
|
26
|
+
}
|
|
27
|
+
|
|
19
28
|
return {
|
|
20
|
-
name:
|
|
29
|
+
name: PluginName,
|
|
21
30
|
|
|
22
31
|
async postBuild({siteConfig, routes, outDir, head}) {
|
|
23
32
|
if (siteConfig.noIndex) {
|