@symbo.ls/brender 3.14.658 → 3.14.660
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/dist/esm/sitemap.js +4 -4
- package/package.json +14 -1
- package/sitemap.js +10 -1
package/dist/esm/sitemap.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
function
|
|
1
|
+
function c(n,a){const r=([t,e])=>!t.includes(":")&&!t.endsWith("/*")&&!(e&&typeof e=="object"&&(e.notFound===!0||e.metadata?.notFound===!0));return`<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<urlset
|
|
3
3
|
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
|
4
4
|
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
|
5
|
-
${Object.entries(
|
|
5
|
+
${Object.entries(a).filter(r).map(([t,e])=>`
|
|
6
6
|
<url>
|
|
7
|
-
<loc>${(
|
|
7
|
+
<loc>${(e.metadata||{}).canonical||`${n}${t==="/"?"":t}`}</loc>
|
|
8
8
|
<lastmod>${new Date().toISOString()}</lastmod>
|
|
9
9
|
<changefreq>weekly</changefreq>
|
|
10
10
|
<priority>${t==="/"?"1.0":"0.8"}</priority>
|
|
11
11
|
</url>`).join(`
|
|
12
12
|
`)}
|
|
13
|
-
</urlset>`}export{
|
|
13
|
+
</urlset>`}export{c as generateSitemap};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/brender",
|
|
3
|
-
"version": "3.14.
|
|
3
|
+
"version": "3.14.660",
|
|
4
4
|
"license": "CC-BY-NC-4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
"default": "./dist/esm/index.js"
|
|
12
12
|
},
|
|
13
13
|
"./package.json": "./package.json",
|
|
14
|
+
"./sitemap": {
|
|
15
|
+
"development": "./sitemap.js",
|
|
16
|
+
"import": "./dist/esm/sitemap.js",
|
|
17
|
+
"default": "./dist/esm/sitemap.js"
|
|
18
|
+
},
|
|
14
19
|
"./hydrate": {
|
|
15
20
|
"development": "./hydrate.js",
|
|
16
21
|
"import": "./dist/esm/hydrate.js",
|
|
@@ -42,9 +47,17 @@
|
|
|
42
47
|
},
|
|
43
48
|
"dependencies": {
|
|
44
49
|
"@symbo.ls/css": "^3.14.599",
|
|
50
|
+
"@symbo.ls/default-config": "^3.14.0",
|
|
51
|
+
"@symbo.ls/element": "^3.14.5",
|
|
45
52
|
"@symbo.ls/helmet": "^3.14.599",
|
|
53
|
+
"@symbo.ls/scratch": "^3.14.775",
|
|
54
|
+
"@symbo.ls/utils": "^3.14.772",
|
|
55
|
+
"esbuild": "^0.28.1",
|
|
46
56
|
"linkedom": "^0.16.8"
|
|
47
57
|
},
|
|
58
|
+
"optionalDependencies": {
|
|
59
|
+
"@symbo.ls/funcql": "^3.14.0"
|
|
60
|
+
},
|
|
48
61
|
"devDependencies": {
|
|
49
62
|
"@babel/core": "^7.29.7"
|
|
50
63
|
},
|
package/sitemap.js
CHANGED
|
@@ -6,7 +6,16 @@
|
|
|
6
6
|
* @returns {string} Sitemap XML
|
|
7
7
|
*/
|
|
8
8
|
export function generateSitemap (baseUrl, routes) {
|
|
9
|
-
|
|
9
|
+
// Skip routes that are not real crawlable addresses: dynamic ':param'
|
|
10
|
+
// patterns, '/*' wildcards, and the project's not-found page
|
|
11
|
+
// (notFound: true at the page top level or in its metadata).
|
|
12
|
+
const indexable = ([path, config]) =>
|
|
13
|
+
!path.includes(':') &&
|
|
14
|
+
!path.endsWith('/*') &&
|
|
15
|
+
!(config && typeof config === 'object' &&
|
|
16
|
+
(config.notFound === true || config.metadata?.notFound === true))
|
|
17
|
+
|
|
18
|
+
const urls = Object.entries(routes).filter(indexable).map(([path, config]) => {
|
|
10
19
|
const metadata = config.metadata || {}
|
|
11
20
|
const canonical = metadata.canonical || `${baseUrl}${path === '/' ? '' : path}`
|
|
12
21
|
|