paladindigital/structured-data

Framework agnosting package to generate structured-data snippets in json-ld format.

v1.0.0 2017-12-29 11:56 UTC

This package is auto-updated.

Last update: 2024-12-08 01:16:36 UTC


README

A framework agnostic package to assist in creating valid Schema.org Json-LD.

Build Status

Installation

composer require paladindigital/structured-data

Usage

The package contains a class for each (implemented) schema.org type (if the type you desire isn't implemented feel free to raise a pull request or issue).

The package is used by feeding the classes into the appropriate heirarchy, you start with your desired type, then create a jsonld object and pass your custom type in the constructor. You then call render on your object in the appropriate place in your templates.