georgringer/schema-org-generator
最新稳定版本:0.3.0
Composer 安装命令:
composer require georgringer/schema-org-generator
包简介
Generate json-ld based on schema org
README 文档
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>
统计信息
- 总下载量: 9.48k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2019-04-12