Drupal Schema.org Blueprints Module

Earlier this year Drupal developer Jacob Rockowitz introduced the Schema.org Blueprints module (schemadotorg) to the Drupal community. Having spent a lot of time thinking about Schema.org and content models recently, this module immediately peaked my interested.

For background, Schema.org “is a collaborative, community activity with a mission to create, maintain, and promote schemas for structured data on the Internet, on web pages…”. And as described on the Schema.org Blueprints module page, it “takes a Schema.org-first approach to building content models and structured data in Drupal”.

TL;DR: the Schema.org Blueprints module will help you build content in Drupal that matches the Schema.org definitions.

I love it. The idea that I can easily build Drupal content according to a standard (as opposed to “whatever field I think of”) is game-changing. This module may fundamentally change how we build content in Drupal. In a world where Drupal content types, paragraphs, taxonomies, and other entity types adhere to a standard for their content model, the possibilities for efficiency and collaboration are exponential.

Exploring the Schema.org Blueprints Module

To get my bearings with the module (and potentially help others), I recorded a video where I learn to use the module. The purpose of this video is not to be a polished tutorial for the module, but to share my learning, mistakes, and thought processes.

This video covers:

  1. Introduction to the module
  2. Installation of the module and other useful contrib modules
  3. Brief overview of the administrative interface provided by the module
  4. Building content models for a Drupal Camp website

Schema.org Blueprints Module – Two Big Lessons Learned

The more I used this module the more I was impressed. There are so many great features already included in the module that I was repeatedly pleasantly surprised.

Lesson # 1 – Enable all the modules first

There were a few times during this exploration where I had created content models that I would have been better if I had other contrib modules enabled. The module makes it easy to “tear down” and recreate these models, but ideally, that’s not necessary.

Here is a list of modules that I recommend having installed before generating schemadotorg content models:

  • Core
    • Datetime
    • Datetime Range
    • Email
    • Link
    • Text
    • Time Field
    • Media
    • Media Library
  •  Contrib
    • Address
    • Content Browser
    • Embed
    • Entity Embed
    • Entity Browser
    • Entity Browser IEF
    • Field Group
    • Inline Entity Form

Lesson #2 – The Schema.org Blueprints module is a guide

Some of the great features of this module are in the guidance it provides in the user interface.

  • Though not promoted as such, the Mapping Sets admin page (/admin/config/search/schemadotorg/sets) is an excellent “dashboard” for using the module. It provides a place to see what content models exist, links to those entity types, and recommendations for common sets of models.

    Schemadotorg module's Mapping Sets page
  • The “Add Schema.org content type” page (/admin/structure/types/schemadotorg) not only provides recommenations for common sets of models, but also describes the order in which those models should be created.

    Schemadotorg module's Add content type page

Local Contrib Development Environment Setup

If you’re interested in exploring and contributing to this module yourself, you’re welcome to use the same setup I have for this video: https://github.com/daggerhartlab/schemadotorg-dev/ It uses Lando and expects to work with the schemadotorg module as a custom module.

This is not an official development environment by any means, just an easy place to start for those that do not have an existing contribution setup. Feedback welcome!

And that’s it for now! I hope to make more videos like this where I continue exploring the module and using it to create content models for common websites.

0 Thoughts

Discussion

Leave a Reply

Your email address will not be published. Required fields are marked *