This project is not covered by Drupal’s security advisory policy.

This project extends Drupal's Metatag module to display structured data as JSON LD in the head of web pages. Either hard-code properties or identify patterns using token replacements. Using the override system in Metatag module you can define default structured data values for all content types, override the global content defaults for a particular content type, or even override everything else on an individual node to provide specific values for that node.

This module defines metatag groups that map to types, and metatag tags for properties, then steps in before the values are rendered as metatags, pulls the values out of the header created by Metatag, and instead renders them as JSON LD when the page is displayed.

Since the list is huge, and growing, this module only provides a small subset of those values. But it is designed to be extensible. There is an included module, Article Example, that shows how other modules can add more properties to types that are already defined. Several types are included which can be copied to add new types (groups) with any number of their own properties.

The module includes a base group class and several base tag classes that can be extended. Many properties are simple key/value pairs that require nothing more than extending the base class and giving them their own ids. Some are more complex, like Person and Organization, and BreadcrumbList, and they collect multiple values and serialize the results.

The module creates the following object types:

For more information and to test the results:

Using this module, the code in the head of the page might end up looking like this:

<script type="application/ld+json">{
    "@context": "",
    "@graph": [
            "@type": "Article",
            "description": "Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Donec sollicitudin molestie malesuada. Donec sollicitudin molestie malesuada. Donec rutrum congue leo eget malesuada. Nulla quis lorem ut libero malesuada feugiat. Vestibulum ac diam sit amet quam vehicula elementum sed sit amet dui.",
            "datePublished": "2009-11-30T13:04:01-0600",
            "dateModified": "2017-05-17T19:02:01-0500",
            "headline": "Curabitur arcu erat]",
            "author": {
                "@type": "Person",
                "name": "Minney Mouse",
                "sameAs": ""
            "publisher": {
                "@type": "Organization",
                "name": "",
                "sameAs": "",
                "logo": {
                    "@type": "ImageObject",
                    "url": "",
                    "width": "600",
                    "height": "60"
            "mainEntityOfPage": {
                "@type": "WebPage",
                "@id": ""
Supporting organizations: Metatag项目的Drush安装命令:复制到剪贴板



8.x-1.0-rc4tar.gz (24.57 KB) | zip (82.07 KB)2017年8月6日发布说明简 | 繁 | 更多


7.x-1.0-rc1tar.gz (20.22 KB) | zip (40.87 KB)2017年8月4日发布说明简 | 繁 | 更多


8.x-1.x-devtar.gz (24.58 KB) | zip (82.12 KB)2017年8月6日发布说明简 | 繁 | 更多
7.x-1.x-devtar.gz (20.22 KB) | zip (40.87 KB)2017年8月4日发布说明简 | 繁 | 更多