georgringer / schema-org-generator
Generate json-ld based on schema org
Package info
github.com/georgringer/schema_org_generator
Type:typo3-cms-extension
pkg:composer/georgringer/schema-org-generator
Fund package maintenance!
0.3.0
2022-04-26 10:31 UTC
Requires
- php: >=7.4
- spatie/schema-org: ^3
- typo3/cms-core: ^10.4 || ^11.5
Replaces
- typo3-ter/schema-org-generator: 0.3.0
This package is auto-updated.
Last update: 2026-02-13 11:23:48 UTC
README
This extensions generates json-ld from models and is currently just a PoC.
Installation
- Do
composer require spatie/schema-org - Install this extension
Requirements
- TYPO3 10,11,12
- PHP 7.2+
Usage
Basic usage
In your site template you can write:
<schema:jsonLd type="webSite" data="{url:'https://www.tld.com'}" />
This will output
<script type="application/ld+json">
{"@context":"https:\/\/schema.org","@type":"WebSite","url":"https:\/\/www.tld.com"}
</script>
As type you can use any type available at https://github.com/spatie/schema-org/tree/master/src
Map models to json+ld
Currently only tt_address is supported. Add this snippet to your ListItem.html:
Currently it will only output the property email.
<schema:objectToJsonLd object="{address}" />
This will output
<script type="application/ld+json">
{"@context":"https:\/\/schema.org","@graph":[{"@type":"PostalAddress","email":"mailus@email.com"}]}
</script>