Open pietrop opened 6 years ago
@pietrop thank you for the PR, going to look into it later today
That’s great, thanks @iefserge let me know if you have any questions
@pietrop Hi, doing some updates to support amp-story v1 and interested in incorporating parts of your PR (specifically language code and authorType). Would this make sense?
On the metadata fields, I'm adding new preview
field (separate from structured data props) because I think it may be useful to customize story preview differently. https://github.com/micnews/story-json-to-amp/pull/38.
Thanks @iefserge, sounds good, let me know if you have any questions on any parts of it.
Hello, Thanks for the great project repo and open sourcing this. As mentioned ( https://github.com/micnews/story-json/issues/6 ) at BBC News Labs, we are doing some AMP stories experiments.
Following up on this issue https://github.com/micnews/story-json/issues/9 in this pull request we've addressed some of the issues around:
?
).Structured data for Google SEO
From google amp stories docs
See google documentation on the structured data specs
There is a google structured data testing tool
We’ve added support for son with structured data for google SEO.
by adding the following fields to
story-json
:author
authorType
to Micstory-json
, to have option to haveOrganisation
instead of default, hardcodedPerson
.date
images
undermeta.images
. To add to metadata for google SEO, to structured data json as well as the new metadata requirementsExample output after changes
Language code for AMP HTML
The language of the AMP HTML page is hardcoded to English (
en
) in the current implementation, and we have a use case where we need to publish in Russian language.And therefore need the flexibility to change the language code.
So added a language code for the AMP HTML page header.
By adding the following optional field to
story-json
:story-json
alanguageCode
attribute.Allowing to render as
Valid attributes for language codes follow the HTML specs of using
ISO 639-1
language CodesAMP Story metadata fields
Added support for AMP story metadata info in body of AMP HTML.
See amp documentation
at the moment mic
story-json
only has these fieldsUsed the images fields previously added for structured data to populate remaining metadata fields.
See individual commits for a breakdown.
Thanks, and let us know if you have any questions.