-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Structured data, AMP Story metadata, AMP HTML language code #36
base: master
Are you sure you want to change the base?
Conversation
Removed duplicate nested publisher key in meta data for schema.org requirement
removing CLI info from package.json
put bin/cli.js back
added support for changing AMP HTML header language code, by adding a languageCode attribute to Mic story-json
added support for AMP Story metadata fields, see docs for more details https://www.ampproject.org/docs/reference/components/amp-story#announcements
with new fields
@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 |
where | ||
- first one is square | ||
- second one is `poster-portrait` | ||
- third one is `poster-landscape` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pietrop what's the reason for using array vs named keys? i.e images: { square: ..., landscape: ... }
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was following the structured data specs, where they are added to the json as an array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be confusing as we require images to be in the specific order. From the doc looks like structured data schema allows different images to be in any order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just 1 question, otherwise this looks great!
@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 |
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 ( micnews/story-json#6 ) at BBC News Labs, we are doing some AMP stories experiments.
Following up on this issue micnews/story-json#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.