@mannisto/astro-metadata 2.0.0-alpha.4 → 2.0.0-alpha.5
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 +1 -1
- package/src/lib/schema.ts +5 -2
package/package.json
CHANGED
package/src/lib/schema.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Graph, Thing
|
|
1
|
+
import type { Graph, Thing } from "schema-dts"
|
|
2
2
|
|
|
3
3
|
import { getConfig, localize } from "./config.ts"
|
|
4
4
|
import type { Localized } from "./config.ts"
|
|
@@ -8,8 +8,11 @@ import { url } from "./url.ts"
|
|
|
8
8
|
* A structured data item of your own, e.g. a `Product` or an `Event`. The schema.org types
|
|
9
9
|
* give the editor completion, and other objects are also accepted. `@context` is not
|
|
10
10
|
* necessary: the items go into one graph with the context.
|
|
11
|
+
*
|
|
12
|
+
* `@context` is an optional property, not `WithContext<Thing>`: that type makes the union of
|
|
13
|
+
* schema-dts too large for TypeScript when a layout spreads its props into `<Metadata>`.
|
|
11
14
|
*/
|
|
12
|
-
export type SchemaData = Thing
|
|
15
|
+
export type SchemaData = (Thing & { "@context"?: string }) | Record<string, unknown>
|
|
13
16
|
|
|
14
17
|
/**
|
|
15
18
|
* The organization or the person behind the site. It is the publisher of the site and of
|