Add Open Graph - Step 1
Adding support for Open Graph can be done in many ways. In this lesson, we'll create a reusable set of properties we can add to specific page types.
First we need to see what the expected outcome will be. Open Graph for web pages needs to contain at least the following:
Looking at the above we can pull a couple of things out automatically and then add ways to input the rest.
In this lesson, we'll only add Open Graph Content of the type "website", so we don't need input for that. We can also get the URL for the page we are currently on. This leaves us with two remaining properties to add: title and image.
Create a document type composition
Go to the Settings section.
Click on Document Types.
Select Create > Document Type.
Name the Document Type Open Graph.
Click Add Group and name it Open Graph.
Add a property to the group called Open Graph Title.
Select Select property editor and search for textstring.
Click Add.
Add another property named Open Graph Image and use the Media Picker as the editor.
Click Add.
Click Save.
Last updated