Skip to content

Commit

Permalink
add schema README
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Mc Cormack committed Nov 19, 2018
1 parent e1ca444 commit cbe4229
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Add the following to your composer.json file and run /dev/build?flush=all

- [Configuration](/docs/configuration)
- [Meta](/docs/meta)
- [Schema](/docs/schema)
- [Sitemap](/docs/sitemap)
- [Robots](/docs/robots)
- [Blog Configuration](/docs/blog-configuration)
Expand Down
62 changes: 62 additions & 0 deletions docs/schema/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Schema

This module allows you to add schema.org JSON to your webpage and auto generates schema for Blog Posts

## Auto Generated BlogPost Schema

The below snippet is auto generated form your BlogPost data and some site config
settings

```javascript
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "NewsArticle",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://google.com/article"
},
"headline": "Article headline",
"datePublished": "2015-02-05T08:00:00+08:00",
"dateModified": "2015-02-05T09:20:00+08:00",
"description": "A most wonderful article",
"author": {
"@type": "Person",
"name": "John Doe"
},
"publisher": {
"@type": "Organization",
"name": "Google",
"logo": {
"@type": "ImageObject",
"url": "https://google.com/logo.jpg",
"width": 100,
"height": 100
}
},
"image": [
"https://example.com/photos/1x1/photo.jpg"
]
}
</script>
```

In your CMS settings add your organisation name and image to populate the data:

publisher.name
publisher.logo.url
publisher.logo.width
publisher.logo.height

The following data is pulled from the actual BlogPost:

headline - Title
datePublished - PublishDate
dateModified - LastEdited
description - Summary
author.name - First Author FirstName and Surname
image - FeaturedImage.URL

## Manually Adding Schema

Every page apart from Blog Posts have a Schema tab with a textarea field where you can add custom schema to that page.

0 comments on commit cbe4229

Please sign in to comment.