JSON-LD structured data builders for SEO. Product, Article, Organization, WebSite, Breadcrumb, FAQ, HowTo, and more. Zero dependencies.
npm install @arraypress/jsonldimport { product, breadcrumb, faq } from '@arraypress/jsonld';
const ld = product({ name: 'Widget', url: 'https://example.com/widget', price: 9.99, currency: 'usd' });All functions return a plain object with @context: "https://schema.org".
product(options)- Product with offers and ratingsarticle(options)- Article schemablogPosting(options)- BlogPosting (same options as article)organization(options)- Organization schemawebSite(options)- WebSite with optional search actionbreadcrumb(items)- BreadcrumbList from{ name, url? }itemsfaq(items)- FAQPage from{ question, answer }itemshowTo(options)- HowTo with stepsevent(options)- Event schemalocalBusiness(options)- LocalBusiness with address, geo, ratingssoftwareApplication(options)- SoftwareApplication schemacollectionPage(options)- CollectionPage schema
See type definitions in src/index.d.ts for full option details.
MIT