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

Support for CTA Layer #10

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

Support for CTA Layer #10

pietrop opened this issue May 3, 2018 · 2 comments

Comments

@pietrop
Copy link

pietrop commented May 3, 2018

Hello,
We were looking to add a Call To Action to one of the cards, but can't seem to find it in the story-json spec. I am not sure how this will play with keeping compatibility between story-json and both /story-json-to-amp and story-json-to-video. But it be great if there was a way to add it?

see here for AMP docs on CTA

If there's a good way to do it, I'd be happy to do a PR if that helps.

Thanks

@ellell
Copy link
Contributor

ellell commented May 8, 2018

Yea, doesn't seem to be something we support at the moment.

I suppose story-json-to-video could just ignore that prop, since there's no way to do a cta really in a video.
@iefserge do you know if have we handled anything similar in story-json before?

@iefserge
Copy link
Contributor

iefserge commented May 8, 2018

@pietrop @ellell I think this can be handled by special option to story-json-to-amp, I'd imagine something like

{
  layersCTA: [
    {
      pageId: 'unique page id specified in story json',
      content: '<a href="http://www.google.com" class="button"> Call to action! </a>'
    }
  ]
}

I think due to AMP CTA layer size restrictions it would be hard to handle this nicely in a cross platform way, as we'll have to adopt the same restrictions.

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

3 participants