Structured Data Markup (sdm)
Categories
Component ID
2673528
Component name
Structured Data Markup (sdm)
Component type
module
Maintenance status
Development status
Component security advisory coverage
covered
Downloads
1632
Component created
Component changed
Component body
Structured Data Markup (sdm)
========
Provides an entity for adding Structured Data Markup (SDM) JSON/LD script objects to your site. You can create fieldable sdm object types to add whatever custom JSON/LD objects you like, and use context module to determine what sdm objects are rendered (in the page ) and when.
A feature module is provided as both an example and an implementation of the popular google social profiles via JSON/LD.
Alternative Modules
=========
- https://www.drupal.org/project/structured_data - provides a way to add site name and logo as sdm output. In contrast this module allows any sdm object according to the JSON/LD specification.
- https://www.drupal.org/project/jsonld - provides a way to output entities as JSON/LD objects via REST web services. In contrast this module outputs via
tags in the HTML markup.
- Download and install in the usual way.
- Make sure that your admin user(s) have the Administer Structured Data Markup (administer_sdm_data) permission.
- Navigate to /admin/structure/sdm/types to add a sdm object type(s).
- Manage the sdm type as you would any other entity by adding a description, adding fields etc. NOTE that the display management screen is not used so you can ignore that. NOTE: This module only supports text and textarea field types, but you can add whatever JSON/LD values you like with one of these. No other fields are needed!
- Navigate to /admin/structure/sdm and add an sdm object(s) of your new type(s).
- Navigate to /admin/structure/context and add a context (or modify an existing one). Add an sdm reaction and select one or more sdm objects that you have created. The JSON/LD object will be included in the of the pages on which the context is active.
- Install the google_social_profile_sdm module as usual.
- Navigate to /admin/structure/sdm and add one or more sdm objects of type Google Social Profile (google_social_profile). See https://developers.google.com/structured-data/customize/social-profiles for more information on this JSON/LD implementation.
- Navigate to /admin/structure/context and create/add to a context and specify on which pages the sdm object will appear.
