schema-dts Schema.org 结构化数据的 TypeScript 类型
An agent skill built on schema-dts by Google, which provides complete TypeScript type definitions for the Schema.org vocabulary. Enables type-safe generation and validation of JSON-LD structured data markup for SEO, rich search results, and knowledge graph integration.
Installation
Use the upstream install or setup path that matches your environment:
- npm install --save-dev schema-dts
- npm install --save-dev schema-dts-gen
- npx schema-dts-gen --ontology=https://schema.org/version/latest/schemaorg-all-https.nt
- Use NPM to install dependencies:
Requirements and caveats from upstream:
- Notice that any node can have an @id when defining it. And you can reference
- the same node from different places by simply using an ID stub, for example
Basic usage or getting-started notes:
-
- To use the typings for your project, simply add the
- schema-dts NPM package to your
- Source: https://github.com/1991513ccie-png/skills
- Extracted from upstream docs: https://raw.githubusercontent.com/google/schema-dts/HEAD/README.md