カテゴリー
Google Google AMPページ SEO/検索エンジン対策

AMPページでJavaScript使用可能に!amp-script一般開放!独自JSの実装が可能に!実装方法/使い方はAMP公式で確認可能。Google検索新機能/SEO 最新情報 2019年8月

※掲載リンクはアフィリエイト広告を含む場合があります。

おお、ついに!AMPページでオリジナルJava Scriptが使えるように。

といっても色々制限あるぽいのであれだけど。中途半端に手出してAMPエラーのポイント増えてしまうのもな。というのもある。

というかそもそも俺に扱えるようなものかという謎が先か、適当に書いたやつじゃ動かないんでしょうきっと?w

AMP公式ブログのamp-script記事とツイート

https://twitter.com/amphtml/status/1164245170868641794?s=21

amp-script: AMP ❤️ JS – The AMP Blog

Earlier this year at AMP Conf, we introduced the developer preview of . Now we are announcing the general availability of . It’s an AMP component that runs your own JavaScript in a separate Worker thread. This lets you to add custom JavaScript to your AMP page while still retaining its lightning-fast speed!
lets you cover use cases that you couldn’t with existing AMP components. It also lets you share code across your AMP and non-AMP pages. You can even use a JavaScript framework. Here are some of the examples that the team working on has built:


Microsoft翻訳


今年の初めにAMP Confで、の開発者プレビューを紹介しました。今、私たちはの一般的な可用性を発表しています。これは、別のワーカー スレッドで独自の JavaScript を実行する AMP コンポーネントです。これにより、その雷速を維持しながら、あなたのAMPページにカスタムJavaScriptを追加することができます!
では、既存の AMP コンポーネントでは使用できなかったユース ケースをカバーできます。また、AMP ページと非 AMP ページ間でコードを共有することもできます。JavaScript フレームワークを使用することもできます。に取り組んでいるチームが構築した例の一部を次に示します。

Read more

翻訳ひどいな。原文判断お願いします!

※amp-scriptに関してはもうちょい調べて後で追記予定。

AmpページへのJS実装方法、<amp-script>の使い方はAMP公式ドキュメントで確認を

Add custom JavaScript to AMP pages with amp-script – amp.dev

AMP strives to provide solutions that get developers where they want to be quickly and hassle free. However, some types of functionality are too tailored to individual use cases or require custom JavaScript. The AMP framework is expanding to accommodate these needs with <amp-script>. The amp-script component allows AMP developers to introduce custom JavaScript that expand page features and render as valid AMP.

Read more

AMPと私

AMPエラーとの戦い。プラグイン使用してAMP化なので、いじりたくてもいじれない、いじれるけど管理が大変みたいな悩ましさ。

だったらいっそカノニカルAMPなのか?でも、大変だよなー管理も、諸々の制限も。というところにamp-script登場。幅は広がるが。うーん。

読んでくれてありがとうございます。また見に来てください
Koukichi Takahashi @Koukichi_T

Twitter常駐。ストックフォトグラファー/ブロガー。インスタグラム/Twitterを中心にSNSの新機/アップデート最新情報を配信中。写真素材EyeEm/Getty Images/イメージナビ/Adobe Stock/スナップートなどで販売中です。その他各種製品本音レビュー掲載