vite-plugin-sitemap 0.5.0 → 0.5.3

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/README.md CHANGED
@@ -94,6 +94,18 @@ export default {
94
94
 
95
95
  You can find a working example in example folder.
96
96
 
97
+ ### externalSitemaps
98
+
99
+ - **Type:** `string[]`
100
+ - **Default:** `[]`
101
+
102
+ Array of strings with other sitemaps paths or urls.
103
+ ```js
104
+ generateSitemap({
105
+ externalSitemaps: ['sitemap_1', 'sitemap_2', 'subpath/sitemap_3', 'https://site.com/sitemap.xml']
106
+ })
107
+ ```
108
+
97
109
  ### outDir
98
110
 
99
111
  - **Type:** `string`
package/dist/index.d.ts CHANGED
@@ -25,6 +25,9 @@ interface RobotOption {
25
25
  */
26
26
  cleanParam?: string;
27
27
  }
28
+ type RoutesOptionMap<T> = T | {
29
+ [key: string]: T;
30
+ };
28
31
  /**
29
32
  * Plugin options.
30
33
  */
@@ -46,6 +49,12 @@ interface Options {
46
49
  * @default []
47
50
  */
48
51
  exclude: string[];
52
+ /**
53
+ * Other sitemaps paths
54
+ * Example: ['sitemap_1.xml', 'path/sitemap_2.xml', 'https://site.com/sitemap.xml']
55
+ * @default []
56
+ */
57
+ externalSitemaps: string[];
49
58
  /**
50
59
  * String with base path.
51
60
  * Example: '/mysubpath'
@@ -67,17 +76,17 @@ interface Options {
67
76
  * Change frequency option for sitemap
68
77
  * @default 'daily'
69
78
  */
70
- changefreq: string;
79
+ changefreq: string | RoutesOptionMap<string>;
71
80
  /**
72
81
  * Priority option for sitemap
73
82
  * @default 1
74
83
  */
75
- priority: number;
84
+ priority: number | RoutesOptionMap<number>;
76
85
  /**
77
86
  * Last modification option for sitemap
78
87
  * @default new Date()
79
88
  */
80
- lastmod: Date;
89
+ lastmod: Date | RoutesOptionMap<Date>;
81
90
  /**
82
91
  * Converts XML into a human-readable format
83
92
  * @default false