@schemasentry/next 0.3.1 → 0.3.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/README.md +51 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# @schemasentry/next
|
|
2
|
+
|
|
3
|
+
Next.js App Router `<Schema />` component for Schema Sentry.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @schemasentry/next @schemasentry/core
|
|
9
|
+
npm install @schemasentry/next @schemasentry/core
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { Schema, Article, Organization } from "@schemasentry/next";
|
|
16
|
+
|
|
17
|
+
export default function BlogPost() {
|
|
18
|
+
const org = Organization({
|
|
19
|
+
name: "Acme Corp",
|
|
20
|
+
url: "https://acme.com"
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const article = Article({
|
|
24
|
+
headline: "My Article",
|
|
25
|
+
authorName: "John Doe",
|
|
26
|
+
datePublished: "2026-02-11",
|
|
27
|
+
url: "https://acme.com/blog/my-article"
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<>
|
|
32
|
+
<Schema data={[org, article]} />
|
|
33
|
+
<main>
|
|
34
|
+
<h1>{article.headline}</h1>
|
|
35
|
+
...
|
|
36
|
+
</main>
|
|
37
|
+
</>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Features
|
|
43
|
+
|
|
44
|
+
- **Zero client-side JS** - Renders as static JSON-LD
|
|
45
|
+
- **Type-safe** - Full TypeScript support
|
|
46
|
+
- **Deterministic** - Clean, reviewable diffs
|
|
47
|
+
- **Next.js App Router** - Built for Next.js 13+
|
|
48
|
+
|
|
49
|
+
## Documentation
|
|
50
|
+
|
|
51
|
+
See [Schema Sentry Docs](https://github.com/arindamdawn/schema-sentry#readme)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schemasentry/next",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Next.js App Router bindings for Schema Sentry.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@schemasentry/core": "0.3.
|
|
42
|
+
"@schemasentry/core": "0.3.2"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"next": ">=13.4.0",
|