Skip to content

Instantly share code, notes, and snippets.

@Weiyuan-Lane
Last active July 16, 2019 19:26
Show Gist options
  • Save Weiyuan-Lane/b31aa30a85620fff7738c903e50c713e to your computer and use it in GitHub Desktop.
Save Weiyuan-Lane/b31aa30a85620fff7738c903e50c713e to your computer and use it in GitHub Desktop.
Minimum layout that is valid for amp development
<!doctype html>
<html ⚡ lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<!-- Note the following 2 properties that you have to set in your markup -->
<title>%{title}</title>
<link rel="canonical" href="%{linkToNonAmpVersion}">
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body></body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment