@jdevalk/astro-seo-graph 0.4.0 → 0.4.2
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/AGENTS.md +24 -0
- package/package.json +2 -2
package/AGENTS.md
CHANGED
|
@@ -512,6 +512,30 @@ untyped form. The generic gives you autocomplete for every property on the
|
|
|
512
512
|
chosen type, making it much harder to miss recommended fields like
|
|
513
513
|
`potentialAction`, `geo`, or `offers`.
|
|
514
514
|
|
|
515
|
+
### Overriding `@id`
|
|
516
|
+
|
|
517
|
+
Every dedicated builder computes an `@id` from the `IdFactory` (e.g.
|
|
518
|
+
`ids.website`, `ids.article(url)`). You can override it by passing `'@id'`
|
|
519
|
+
directly — the explicit value wins:
|
|
520
|
+
|
|
521
|
+
```ts
|
|
522
|
+
buildBreadcrumbList(
|
|
523
|
+
{
|
|
524
|
+
url,
|
|
525
|
+
items: [
|
|
526
|
+
{ name: 'Home', url: siteUrl },
|
|
527
|
+
{ name: 'Blog', url: blogUrl },
|
|
528
|
+
],
|
|
529
|
+
'@id': `${blogUrl}#breadcrumb`, // overrides ids.breadcrumb(url)
|
|
530
|
+
},
|
|
531
|
+
ids,
|
|
532
|
+
);
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
This works on all builders: `buildWebSite`, `buildWebPage`, `buildArticle`,
|
|
536
|
+
`buildBreadcrumbList`, `buildImageObject`, `buildVideoObject`, and
|
|
537
|
+
`buildSiteNavigationElement`.
|
|
538
|
+
|
|
515
539
|
### assembleGraph
|
|
516
540
|
|
|
517
541
|
Wraps pieces in a `{ "@context": "https://schema.org", "@graph": [...] }`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jdevalk/astro-seo-graph",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Astro integration for @jdevalk/seo-graph-core. Seo component, route factories, content-collection aggregator, Zod content helpers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"astro-seo": "^1.1.0",
|
|
48
48
|
"schema-dts": "^2.0.0",
|
|
49
49
|
"zod": "^3.24.0",
|
|
50
|
-
"@jdevalk/seo-graph-core": "0.5.
|
|
50
|
+
"@jdevalk/seo-graph-core": "0.5.2"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^22.0.0",
|