coblocks icon indicating copy to clipboard operation
coblocks copied to clipboard

AMP compatibility

Open westonruter opened this issue 6 years ago • 1 comments

I was very pleased when testing out all the blocks that they almost all worked just fine when viewed in the AMP plugin's Standard or Transitional modes. Thus, making CoBlocks AMP-compatible appears to be pretty straightforward for the various blocks:

  • Accordion: Perhaps consider using amp-accordion, though the use of details works just fine as it stands.
  • Gist: Register an oEmbed handler for Gists like Jetpack has done. See https://github.com/godaddy/coblocks/issues/175#issuecomment-519384801
  • SVG: Various blocks are writing out SVG with an attribute fillrule. This is not valid SVG and so it the AMP validator is not recognizing it (and thus stripping it). It should rather be fill-rule, AFAIK. Simply doing a search/replace for s/fillrule/fill-rule/i. I'm afraid this could cause block validation problems, but if not, this is an easy fix.
  • Share: These could potentially use amp-social-share component.
  • Carousel Gallery: Make use of amp-carousel on the front-end rather than using flickity.
  • Masonry Gallery: Not yet AMP-compatible. See https://github.com/ampproject/amphtml/issues/19866.

westonruter avatar Aug 08 '19 06:08 westonruter

Issue came up in #2562906-zen

thebud15 avatar Dec 19 '19 16:12 thebud15