AMPをHTMLで書いたコードです。参考にしてくださいね。
- cqtc00h
- 3月31日
- 読了時間: 1分

私が書いたコードです
HTMLで書きました。これは、私の書いたAMPコードです。head 部分と body 部分に分かれていますので、ご注意ください。
プラグインを利用するより、競合が減りますので、より快適に使えるでしょう。
ただし、AMPを使っても、優先的にSEOを扱われることは、なくなりました。
AMPを使う場合、Google アドセンスも注意が必要になります。
これを必要とする方が、どれだけ必要性があるのかわかりませんが、公開します。
<!doctype html>
<html amp lang="en">
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
</script>
<title>サイトのタイトルを入れる</title>
<link rel="canonical" href="https://example.com/article">
<link rel="amphtml" href="https://example.com/article/amp">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<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>
</head>
<body>
<script>
<amp-img src="https://source.unsplash.com/random/600x400" width="600" height="400"></amp-img>
</script>
</body>
</html>
Comments