PHPackages                             justbetter/statamic-structured-data - 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. justbetter/statamic-structured-data

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

justbetter/statamic-structured-data
===================================

2.2.1(2mo ago)48.7k↓56.7%4[1 PRs](https://github.com/justbetter/statamic-structured-data/pulls)PHPPHP ^8.4|^8.5CI passing

Since Apr 25Pushed 1mo ago5 watchersCompare

[ Source](https://github.com/justbetter/statamic-structured-data)[ Packagist](https://packagist.org/packages/justbetter/statamic-structured-data)[ RSS](/packages/justbetter-statamic-structured-data/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (24)Versions (31)Used By (0)

[ ![Banner](./art/banner.svg)](github.com/justbetter/statamic-structured-data "JustBetter")Statamic Structured Data
========================

[](#statamic-structured-data)

This Statamic addon provides a powerful and flexible way to add structured data (JSON-LD) to your Statamic website. It allows you to define structured data templates and automatically inject them into your pages, improving your site's SEO and making your content more understandable for search engines.

Features
--------

[](#features)

- 🔄 Dynamic JSON-LD generation based on entry and term data
- 📝 Template-based structured data configuration
- 📦 Built-in schema presets (WebSite, WebPage, Organization, Article, LocalBusiness)
- 🎯 Support for multiple schemas per page
- 🛠 Antlers template parsing support
- 🧩 Support for replicator-to-JSON-LD field mapping
- 💪 Flexible and extensible architecture

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

[](#requirements)

- PHP ^8.4 or ^8.5
- Laravel ^12.0
- Statamic ^6.0

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

[](#installation)

You can install this addon via Composer:

```
composer require justbetter/statamic-structured-data
```

After installing make sure to load the Structured Data tag in your head.

**Blade**:

```
{!! Statamic::tag('structured-data:head')->fetch() !!}
```

**Antlers**

```
{{ structured-data:head }}
```

Configuration
-------------

[](#configuration)

Make sure to publish the config by running:

```
php artisan vendor:publish --tag=justbetter-structured-data
```

You can now find the config file at `config/justbetter/structured-data.php`. After publishing the config, you can configure:

- which collections support structured data templates
- which taxonomies support structured data objects
- whether presets are enabled
- which default presets are available
- custom preset paths

Usage
-----

[](#usage)

### 1. Creating Structured Data Templates

[](#1-creating-structured-data-templates)

Create templates in your Statamic control panel that define your structured data schemas. Each template can contain multiple schema definitions with:

- Special properties (@context, @type, @id)
- Custom fields with various data types (strings, numeric, arrays, objects)
- Dynamic values using Antlers templating syntax

### 2. Assigning Templates to Entries

[](#2-assigning-templates-to-entries)

In your entry or term's content, you can assign one or more structured data templates using the `structured_data_templates` field. The addon will automatically process these templates and generate the appropriate JSON-LD scripts.

### 3. Rendering Structured Data

[](#3-rendering-structured-data)

Render the generated JSON-LD where you need it in your layout:

**Blade**:

```
{!! Statamic::tag('structured-data:head')->fetch() !!}
```

**Antlers**:

```
{{ structured-data:head }}
```

Example Schema
--------------

[](#example-schema)

Here's an example of how you might structure a basic Organization schema:

```
{
  "specialProps": {
    "context": "https://schema.org",
    "type": "Organization",
    "id": "https://example.com"
  },
  "fields": [
    {
      "key": "name",
      "type": "string",
      "value": "{{ company_name }}"
    },
    {
      "key": "url",
      "type": "string",
      "value": "{{ config:app:url }}"
    }
  ]
}
```

Credits
-------

[](#credits)

- [Kevin Meijer](https://github.com/kevinmeijer97)
- [All Contributors](../../contributors)

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

[ ![JustBetter logo](./art/footer.svg)](https://justbetter.nl "JustBetter")

###  Health Score

54

—

FairBetter than 96% of packages

Maintenance91

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 92.5% 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

Recently: every ~9 days

Total

21

Last Release

45d ago

Major Versions

1.5.0 → 2.0.02026-03-24

1.5.1 → 2.1.02026-04-13

PHP version history (2 changes)1.0.0PHP ^8.2|^8.3

2.0.0PHP ^8.4|^8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d00b3f55cd4ae8b8cfb001a644ed6c7a1127a956c24375bcfe16ce12bd89bed?d=identicon)[justbetter](/maintainers/justbetter)

---

Top Contributors

[![kevinmeijer97](https://avatars.githubusercontent.com/u/9716909?v=4)](https://github.com/kevinmeijer97 "kevinmeijer97 (99 commits)")[![royduin](https://avatars.githubusercontent.com/u/1703233?v=4)](https://github.com/royduin "royduin (3 commits)")[![JoeyMckenzie](https://avatars.githubusercontent.com/u/16873254?v=4)](https://github.com/JoeyMckenzie "JoeyMckenzie (2 commits)")[![BobWez98](https://avatars.githubusercontent.com/u/23509926?v=4)](https://github.com/BobWez98 "BobWez98 (1 commits)")[![martingoldie](https://avatars.githubusercontent.com/u/725238?v=4)](https://github.com/martingoldie "martingoldie (1 commits)")[![okaufmann](https://avatars.githubusercontent.com/u/4414498?v=4)](https://github.com/okaufmann "okaufmann (1 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/justbetter-statamic-structured-data/health.svg)

```
[![Health](https://phpackages.com/badges/justbetter-statamic-structured-data/health.svg)](https://phpackages.com/packages/justbetter-statamic-structured-data)
```

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3417.0k](/packages/duncanmcclean-statamic-cargo)[statamic/seo-pro

68516.6k](/packages/statamic-seo-pro)[marcorieser/statamic-livewire

A Laravel Livewire integration for Statamic.

23111.5k15](/packages/marcorieser-statamic-livewire)[aerni/livewire-forms

A Statamic forms framework powered by Laravel Livewire

2915.1k](/packages/aerni-livewire-forms)[aerni/advanced-seo

Comprehensive SEO addon for Statamic with flexibility in mind

1818.2k](/packages/aerni-advanced-seo)

PHPackages © 2026

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