Skip to content
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

Metadata fields AMP Story recent update #9

Open
pietrop opened this issue May 3, 2018 · 4 comments
Open

Metadata fields AMP Story recent update #9

pietrop opened this issue May 3, 2018 · 4 comments

Comments

@pietrop
Copy link

pietrop commented May 3, 2018

From the AMP Story documentation, it looks like Google has updated the Metadata fields for AMP stories with some new ones.

Was wondering if it was possible (or what it would take) to change the story-json to support those?

Happy to do a PR, with some guidance, if that helps.

More details on the (4/2018) New metadata requirements here

From their docs

We're adding four new required attributes and two optional attributes to the element:

<!-- `title`, `publisher`, `publisher-logo-src` and `poster-portrait-src` will soon be required. -->
<amp-story standalone title="My Story"
    publisher="The AMP Team"
    publisher-logo-src="https://example.com/logo/1x1.png"
    poster-portrait-src="https://example.com/my-story/poster/3x4.jpg">

<!-- `poster-square-src` and `poster-landscape-src` are optional, but strongly recommended. -->
<amp-story standalone title="My Story"
    publisher="The AMP Team"
    publisher-logo-src="https://example.com/logo/1x1.png"
    poster-portrait-src="https://example.com/my-story/poster/3x4.jpg"
    poster-square-src="https://example.com/my-story/poster/1x1.jpg"
    poster-landscape-src="https://example.com/my-story/poster/4x3.jpg">

These metadata attributes will be used for displaying a preview of this story across the AMP stories ecosystem. For example, these attributes can be used to render an engaging preview link in the bookend of a related story. Providing these attributes will also help ensure your story is future-proof for rich, embedded experiences in AMP stories surfaces to come.

Thanks

@ellell
Copy link
Contributor

ellell commented May 3, 2018

@pietrop oh interesting, sounds like something we'd want to add to story-json and story-json-to-amp for sure. Don't have capacity to handle this right now, but yes PRs are always welcome!

@pietrop
Copy link
Author

pietrop commented May 3, 2018

ok, cool. thanks @ellell

Could you advice on whether it would just be a matter of changing the render-meta.js in story-json-to-amp to accept those fields?

@ellell
Copy link
Contributor

ellell commented May 7, 2018

@pietrop Not quite, render-meta.js is for rendering the schema but for those amp updates we want to add props to the amp-story tag: https://github.com/micnews/story-json-to-amp/blob/master/lib/index.js#L128. But yes it seems like the object passed to render-meta.js is already prepared with at least some of those props so we should reuse the same data.

@pietrop
Copy link
Author

pietrop commented May 21, 2018

Hi @ellell,
Just a heads up we did a pull request micnews/story-json-to-amp#36 in the other repo.

Let me know what you think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants