Skip to content

Instantly share code, notes, and snippets.

Avatar

shinya deguchi deroter

  • ふにす
  • 大阪
View GitHub Profile
View embed-twbtn
<a href="生成されたリンクURL" class="任意のクラス" data-screen-name="Twitterのユーザー名" data-show-count="false" target="_blank">リンク文字列</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
View amp-url
<link rel="amphtml" href="https://www.example.com/url/to/amp/document.html">
View amp-img
<amp-img src="welcome.jpg" alt="Welcome" height="400" width="800" layout="responsive"></amp-img>
View amp-basics
<!doctype html>
<html amp lang="ja">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,minimal-ui" />
<title>サイト名</title>
<meta name="description" content="サイトの説明文" />
<link rel="canonical" href="example.ampproject.org">
<script type="application/ld+json">
{ "datePublished": "2015-1-14T12:02:41Z", }
View amp-pub
<script type="application/ld+json">
{ "datePublished": "2015-1-14T12:02:41Z", }
</script>
View amp-css
<style amp-custom>
/* any custom style goes here */
body {
background-color: white;
}
amp-img {
background-color: gray;
border: 1px solid black;
}
</style>
View amp-style
<style>body {opacity: 0}</style><noscript><style>body {opacity: 1}</style></noscript>
<script async src="https://cdn.ampproject.org/v0.js"></script>
View amp-viewport
推奨
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
現実的
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,minimal-ui" />
View amp-canonical
<link rel="canonical" href="http://example.ampproject.org/article-metadata.html" />
You can’t perform that action at this time.