Skip to content

Instantly share code, notes, and snippets.

View dfanchon's full-sized avatar

Didier Fanchon dfanchon

  • WebTales
  • France
View GitHub Profile
{
"title": "My story",
"publisher": "Publisher",
"publisher-logo-src": "logo image url", //required, 1x1 aspect, minimum size 928px x 928px
"poster-portrait-src": "portrait poster image url", // required, .jpg, .png, or .gif, 3x4 aspect, minimum size 696px x 928px
"supports-landscape": true, // optional
"background-audio": "audio url", // optional
"poster-square-src": "image url", // optional, .jpg, .png, or .gif, minimum size 928px x 928px
"poster-landscape-src": "image url", // optional, .jpg, .png, or .gif, 4x3 aspect, minimum size 928px x 696px
"pages": [
{
"headline": { // The key is the field name
"type": "String", // GraphQL type: String, Integer, Date, HTML, ...
"schemaOrgProperty": "headline", // Used to generate the JSON-LD markup
"required": true, // required or not to validate, articles missing valid data won't be extracted
"showInList": true, // true to be displayed in back-office lists
"cssSelector": ".content__headline", // CSS selector for extraction
"attributeName": null, // HTML attribute when needed, used in conjunction with css selector
"markupType": "microdata", // Markup type: json-ld, microdata, rdfa, none
"markupProperty": "headline" // Markup property
@dfanchon
dfanchon / wordpress.json
Created December 8, 2017 10:00
AMPize Wordpress Model
{
"post": {
"name": "post",
"description": "Post",
"schemaOrgType": "Article",
"fields": {
"id": {
"type": "ID",
"required": true
},
{
"actor": {
"name": "actor",
"fields": {
"actor_id": {
"name": "actor_id",
"type": "Int",
"required": true
},
"first_name": {
{
"content": {
"name": "content",
"description": "The Guardian API content",
"fields": {
"id": {
"type": "String",
"required": true,
"description": "Content ID"
},
@dfanchon
dfanchon / gist:7a5d7d097b46aa4d08d3bd39b3958c55
Last active February 27, 2017 12:37
REST API Tutorial STEP 6-1
{
"content": {
"name": "content",
"description": "The Guardian API content",
"fields": {
"id": {
"type": "String",
"required": true,
"description": "Content ID"
},
runtime: custom
env: flex
runtime_config:
document_root: public
@dfanchon
dfanchon / gist:0bc2b68bcacd167a0e7b5fffb1ba87a6
Last active February 27, 2017 12:36
REST API Tutorial STEP 5-1
{
"content": {
"name": "content",
"description": "The Guardian API content",
"fields": {
"id": {
"type": "String",
"required": true,
"description": "Content ID"
},
@dfanchon
dfanchon / gist:4b40fedb70e68d0d544699d40941d742
Last active February 27, 2017 12:36
REST API Tutorial STEP 4-1
{
"content": {
"name": "content",
"description": "The Guardian API content",
"fields": {
"id": {
"type": "String",
"required": true,
"description": "Content ID"
},
@dfanchon
dfanchon / gist:91e2f086087a17b62127068e7840f8a2
Last active February 27, 2017 12:35
REST API Tutorial STEP 3-1
{
"content": {
"name": "content",
"description": "The Guardian API content",
"fields": {
"id": {
"type": "String",
"required": true,
"description": "Content ID"
},