@ultimat3/seo 22.9.0 → 22.10.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/package.json +3 -3
- package/src/routes.ts +9 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultimat3/seo",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.10.0",
|
|
4
4
|
"description": "Enforced SEO: typed meta, JSON-LD, sitemap, robots, feeds, responsive images, perf budgets",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"test": "bun test"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ultimat3/core": "22.
|
|
35
|
-
"@ultimat3/schema": "22.
|
|
34
|
+
"@ultimat3/core": "22.10.0",
|
|
35
|
+
"@ultimat3/schema": "22.10.0"
|
|
36
36
|
}
|
|
37
37
|
}
|
package/src/routes.ts
CHANGED
|
@@ -22,6 +22,11 @@ export interface RouteRecord {
|
|
|
22
22
|
prerender?: () => readonly string[] | Promise<readonly string[]>;
|
|
23
23
|
/** Keep out of the sitemap and emit `noindex`. */
|
|
24
24
|
noindex?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* A public page OUTSIDE `site/` the app asked to list (`seo.sitemap.extra` in `app.config.ts`):
|
|
27
|
+
* indexable although its surface is `app`. The only way an `app/` page reaches a sitemap.
|
|
28
|
+
*/
|
|
29
|
+
sitemap?: boolean;
|
|
25
30
|
lastmod?: string;
|
|
26
31
|
changefreq?: ChangeFreq;
|
|
27
32
|
/** 0.0–1.0. Omit unless the site genuinely has a priority hierarchy. */
|
|
@@ -32,11 +37,13 @@ export function isDynamic(path: string): boolean {
|
|
|
32
37
|
return path.includes(':') || path.includes('*');
|
|
33
38
|
}
|
|
34
39
|
|
|
35
|
-
/** Routes that should appear in a sitemap: public, indexable,
|
|
40
|
+
/** Routes that should appear in a sitemap: public, indexable, `site/` or listed by the app. */
|
|
36
41
|
export function indexableRoutes(routes: readonly RouteRecord[]): readonly RouteRecord[] {
|
|
37
42
|
return routes.filter(
|
|
38
43
|
(route) =>
|
|
39
|
-
route.surface === 'site'
|
|
44
|
+
(route.surface === 'site' || route.sitemap === true) &&
|
|
45
|
+
route.noindex !== true &&
|
|
46
|
+
route.meta?.robots?.index !== false,
|
|
40
47
|
);
|
|
41
48
|
}
|
|
42
49
|
|