All notable changes to this project are documented here.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
0.2.0 - 2026-06-30
Added
- Multi-node
@graphserialisation.to_json_ld/1andto_map/1now accept a list of structs and wrap them in a single top-level@grapharray — the idiomatic way to describe several independent nodes (e.g. a landing page'sOrganization+WebSite+BreadcrumbList+FAQPage) in one document. Backward-compatible (single-struct calls are unchanged). See ADR-003. to_script_tag/1— renders a struct (or list) as a complete, HTML-safe<script type="application/ld+json">…</script>string. Encoded withescape: :html_safe, so a value containing</script>cannot break out of the tag.SchemaOrg.HTML.json_ld/1— an optional Phoenix function component (<SchemaOrg.HTML.json_ld data={@product} />) wrappingto_script_tag/1. Compiled only whenPhoenix.Componentis available;:phoenix_live_viewis an optional dependency, so non-Phoenix consumers never pull it in.- Usage guides on HexDocs: e-commerce product, blog home, single article,
article with video, article with audio, and a complex landing page. Each shows
the struct-literal code and its exact JSON-LD output, verified by
test/examples_test.exs. - Generated
@moduledocs are now clean Markdown: Schema.org comment HTML (<p>,<br>,<a>,<code>) is converted/stripped and[[wiki refs]]become inline code, fixing an ExDoc "unclosed<p>" warning.
Notes
@idcross-node linking is still out of scope;@graphnodes are inlined.
0.1.0 - 2026-06-30
Initial release.
Added
- Generated type modules (
SchemaOrg.*) — 1000+ structs, one per Schema.org Class. Each is a plain struct (one field per valid property, direct + inherited) plus anew/0constructor. Build with struct literals (%SchemaOrg.Product{name: "X", offers: %SchemaOrg.Offer{price: 1.0}}) — fields auto-complete in the editor and the compiler rejects invalid ones. A field is untyped, so it accepts Schema.org's loose value model directly: a scalar or a nested struct, a single value or a list. Produced by the maintainer-onlymix schema_org.build_typestask and committed as reviewable artifacts; never hand-edited. - Runtime serialiser —
SchemaOrg.to_json_ld/1(encoded JSON-LD string with top-level@context) andSchemaOrg.to_map/1(bare map for embedding/tests). Recurses into nested SchemaOrg structs and lists, dropsnilproperties, and re-keys each field to its Schema.org camelCase name. - Maintainer build task
mix schema_org.build_types— ingests the vendoredpriv/schemaorg-current-https.jsonldgraph and renders modules throughpriv/templates/type.ex.eex. Deterministic, sorted output. Not shipped in the Hex package.
Notes
- The only runtime dependency is
:jason. The ~5 MB source graph is read only by the build task — never at the library's compile time. See ADR-001. - The building API is struct literals, not pipe setters — a deliberate performance choice that cut the generated BEAM footprint from ~312 MB to ~20 MB and compile CPU by ~60%, while keeping full field auto-complete. See ADR-002.
- Out of scope for this release:
rangeIncludesvalue-type validation,@idnode linking, multi-language@valueliterals, and Phoenix view helpers.