PHPackages                             rias/craft-schema - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rias/craft-schema

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

rias/craft-schema
=================

A fluent builder Schema.org types and ld+json generator based on Spatie's schema-org package

1.0.3(8y ago)1928.9k1[1 issues](https://github.com/riasvdv/craft-schema/issues)MITPHP

Since Dec 7Pushed 6y ago1 watchersCompare

[ Source](https://github.com/riasvdv/craft-schema)[ Packagist](https://packagist.org/packages/rias/craft-schema)[ RSS](/packages/rias-craft-schema/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (4)Used By (0)

[![Icon](./src/icon.svg)](./src/icon.svg)

[![Latest Version](https://camo.githubusercontent.com/efba88bcf1c0e8ced43eea5a841ab84a9bf8501c550cce9bd5eba7cd75f137d5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f726961737664762f63726166742d736368656d612e7376673f7374796c653d666c61742d737175617265)](https://github.com/riasvdv/craft-schema/releases)[![Quality Score](https://camo.githubusercontent.com/444f514e7d247f1b91f35b4baf98efb95bf1113ff2e73728d5113200220ddf9c/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f726961737664762f63726166742d736368656d612e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/riasvdv/craft-schema)[![StyleCI](https://camo.githubusercontent.com/d52716acccbff1383b1718a476d33aebe76a8c79b4805c8f59973d087b4d7388/68747470733a2f2f7374796c6563692e696f2f7265706f732f3131333438333430392f736869656c64)](https://styleci.io/repos/113483409)[![Total Downloads](https://camo.githubusercontent.com/e96a3272b3144e81e1ef67aa993840a1658c81a0624afd59b600e448dbee2aa5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726961732f63726166742d736368656d612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rias/craft-schema)

Schema plugin for Craft CMS 3.x
===============================

[](#schema-plugin-for-craft-cms-3x)

A fluent builder of Schema.org types and ld+json generator based on Spatie's schema-org package which makes for a fast and easy way to add structured data to your templates.

Support Open Source. Buy beer.
------------------------------

[](#support-open-source-buy-beer)

This plugin is licensed under a MIT license, which means that it's completely free open source software, and you can use it for whatever and however you wish. If you're using it and want to support the development, buy me a beer over at Beerpay!

[![Beerpay](https://camo.githubusercontent.com/603a7256a4b2e80d27d545e8efd89ad49a3c316d03ab29a3fa70ea49046abb1d/68747470733a2f2f626565727061792e696f2f726961737664762f63726166742d736368656d612f62616467652e7376673f7374796c653d626565722d737175617265)](https://beerpay.io/riasvdv/craft-schema)

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 3.0.0-RC1 or later and PHP 7.

Installation
------------

[](#installation)

To install the plugin, install it from the plugin store or follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require rias/craft-schema

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for schema.

Schema Overview
---------------

[](#schema-overview)

Schema provides a fluent builder for all Schema.org types and their properties. For more information and the available methods, check out [spatie/schema-org](https://github.com/spatie/schema-org).

Using Schema
------------

[](#using-schema)

Once Schema is installed, it's accessible through the `craft` variable in your templates.

For the best experience, set the schema to a variable and typehint it to Spatie's model. In combination with the [Symfony plugin](https://plugins.jetbrains.com/plugin/7219-symfony-plugin) for PHPStorm, you get autocompletion for all the Schema's and their properties.

For example:

```
{# @var schema \Spatie\SchemaOrg\Schema #}
{% set schema = craft.schema %}
{{ schema
    .person
      .name("Rias Van der Veken")
      .email("hello@rias.be")
      .company(
        schema.localBusiness
          .name("Marbles")
          .address(schema.postalAddress
            .addressCountry("Belgium")
            .addressLocality("Antwerp")
            .addressRegion("Antwerp")
            .postalCode(2000)
            .streetAddress("IJzerenpoortkaai 3")
          )
      ) | raw
}}
```

Generates the following output:

```

{
   "@context":"http:\/\/schema.org",
   "@type":"Person",
   "name":"Rias Van der Veken",
   "email":"hello@rias.be",
   "company":{
      "@type":"LocalBusiness",
      "name":"Marbles",
      "address":{
         "@type":"PostalAddress",
         "addressCountry":"Belgium",
         "addressLocality":"Antwerp",
         "addressRegion":"Antwerp",
         "postalCode":2000,
         "streetAddress":"IJzerenpoortkaai 3"
      }
   }
}

```

Brought to you by [Rias](https://rias.be)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~19 days

Total

3

Last Release

3046d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dbd355ba9a931da845b0c4ff59a974dab98f829d567bb8c5ff435c823dfa255e?d=identicon)[riasvdv](/maintainers/riasvdv)

---

Top Contributors

[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

---

Tags

schemacmsCraftcraftcmscraft-plugin

### Embed Badge

![Health badge](/badges/rias-craft-schema/health.svg)

```
[![Health](https://phpackages.com/badges/rias-craft-schema/health.svg)](https://phpackages.com/packages/rias-craft-schema)
```

###  Alternatives

[verbb/navigation

Create navigation menus for your site.

90683.7k17](/packages/verbb-navigation)[verbb/formie

The most user-friendly forms plugin for Craft.

101372.9k40](/packages/verbb-formie)[verbb/comments

Add comments to your site.

13753.1k](/packages/verbb-comments)[verbb/tablemaker

Create customizable and user-defined table fields.

40168.8k1](/packages/verbb-tablemaker)[supercool/tablemaker

Create customizable and user-defined table fields.

40141.7k](/packages/supercool-tablemaker)[verbb/vizy

A flexible visual editor field for Craft.

4348.6k](/packages/verbb-vizy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
