Embed github gists in amp-iframes
amp does not permit to embed external script files.
Therefore it's not easily possible to embed github gists. amp allows you to embed iframes, though. Due to the nature of iframes however, amp is not able to figure out the size of an iframe automatically.
This is where the proxy comes into play. It'll embed the gist content and tell amp about the height.
Clone this repo. There is no npm package (yet).
There is no hosted service yet, in order to use it you'd need to host it yourself.
$ npm start -- 8080 # 8080 is the port the server will listen to
curl https://yourproxydomain.com/?url=https://gist.github.com/robin-drexler/d4d167f1aa0bd94094e2
<amp-iframe width="627" height="332"
resizable
sandbox="allow-scripts allow-same-origin"
src="https://yourproxydomain.com/?url={{}}">
<div overflow></div>
</amp-iframe>
See it in use here: https://www.robin-drexler.com/2015/07/07/overriding-default-browser-shortcuts/