vite-plugin-sitemap 0.4.1 → 0.5.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/README.md CHANGED
@@ -111,25 +111,32 @@ Example: ['html', 'md']
111
111
 
112
112
  ### changefreq
113
113
 
114
- - **Type:** `string`
114
+ - **Type:** `string | RoutesOptionMap<string>`
115
115
  - **Default:** `'daily'`
116
116
 
117
117
  Change frequency option for sitemap.
118
118
 
119
119
  ### priority
120
120
 
121
- - **Type:** `number`
121
+ - **Type:** `number | RoutesOptionMap<number>`
122
122
  - **Default:** `1`
123
123
 
124
124
  Priority option for sitemap.
125
125
 
126
126
  ### lastmod
127
127
 
128
- - **Type:** `Date`
128
+ - **Type:** `Date | RoutesOptionMap<Date>`
129
129
  - **Default:** `new Date()`
130
130
 
131
131
  Last modification option for sitemap.
132
132
 
133
+ ### RoutesOptionMap\<Type>
134
+
135
+ - **Type:** `{ [route: string]: Type }`
136
+
137
+ Used for changing `changefreq`, `priority`, or `lastmod` on a by-route level.
138
+ The (optional) route `'*'` is used as default.
139
+
133
140
  ### readable
134
141
 
135
142
  - **Type:** `boolean`
package/dist/index.js CHANGED
@@ -10817,7 +10817,7 @@ function getRoutes(options) {
10817
10817
  }
10818
10818
  function getFormattedSitemap(options, routes) {
10819
10819
  return routes.map((route) => ({
10820
- url: new URL(options.basePath ? ensurePrefix("/", options.basePath) + ensurePrefix("/", route) : ensurePrefix("/", "/route"), removeMaybeSuffix("/", options.hostname)).href,
10820
+ url: new URL(options.basePath ? ensurePrefix("/", options.basePath) + ensurePrefix("/", route) : ensurePrefix("/", route), removeMaybeSuffix("/", options.hostname)).href,
10821
10821
  changefreq: options.changefreq,
10822
10822
  priority: options.priority,
10823
10823
  lastmod: options.lastmod
package/dist/index.mjs CHANGED
@@ -10801,7 +10801,7 @@ function getRoutes(options) {
10801
10801
  }
10802
10802
  function getFormattedSitemap(options, routes) {
10803
10803
  return routes.map((route) => ({
10804
- url: new URL(options.basePath ? ensurePrefix("/", options.basePath) + ensurePrefix("/", route) : ensurePrefix("/", "/route"), removeMaybeSuffix("/", options.hostname)).href,
10804
+ url: new URL(options.basePath ? ensurePrefix("/", options.basePath) + ensurePrefix("/", route) : ensurePrefix("/", route), removeMaybeSuffix("/", options.hostname)).href,
10805
10805
  changefreq: options.changefreq,
10806
10806
  priority: options.priority,
10807
10807
  lastmod: options.lastmod
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vite-plugin-sitemap",
3
- "version": "0.4.1",
4
- "packageManager": "pnpm@8.3.1",
3
+ "version": "0.5.0",
4
+ "packageManager": "pnpm@8.9.2",
5
5
  "description": "Sitemap generator plugin for Vite",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.mjs",
@@ -19,15 +19,15 @@
19
19
  "typecheck": "vue-tsc --noEmit"
20
20
  },
21
21
  "devDependencies": {
22
- "@antfu/eslint-config": "0.38.5",
23
- "@types/node": "18.16.3",
24
- "eslint": "8.39.0",
25
- "pkgroll": "1.9.0",
26
- "pnpm": "8.3.1",
27
- "sitemap-ts": "1.4.0",
28
- "typescript": "5.0.4",
29
- "vite": "4.3.3",
30
- "vite-plugin-pages": "0.29.0",
31
- "vue-tsc": "1.6.1"
22
+ "@antfu/eslint-config": "0.43.1",
23
+ "@types/node": "18.18.6",
24
+ "eslint": "8.51.0",
25
+ "pkgroll": "2.0.1",
26
+ "pnpm": "8.9.2",
27
+ "sitemap-ts": "1.5.0",
28
+ "typescript": "5.2.2",
29
+ "vite": "4.5.0",
30
+ "vite-plugin-pages": "0.31.0",
31
+ "vue-tsc": "1.8.19"
32
32
  }
33
33
  }