gistpress icon indicating copy to clipboard operation
gistpress copied to clipboard

Check how gists look on AMP pages

Open GaryJones opened this issue 7 years ago • 3 comments

AMP pages use a limited set of HTML elements, and strip everything else out.

Expected Behaviour

Ideally, if the gist can't be displayed correctly, we'd just leave a clear link to the exact gist ID, file and line number as needed.

Current Behavior

No idea - but it should be tested.

Possible Solution

I'm really not even sure how we'd test if the current page is being shown in an AMP context.

GaryJones avatar Oct 19 '16 01:10 GaryJones

https://github.com/Automattic/amp-wp#handling-media

Looks like there might be some custom embed handler we could use, that would allow at least something to be displayed, instead of it getting stripped out completely.

GaryJones avatar Oct 19 '16 01:10 GaryJones

Awesome!!

anythinggraphic avatar Oct 19 '16 01:10 anythinggraphic

There is now an amp-gist component.

GaryJones avatar Jan 30 '19 20:01 GaryJones