AMP

説明

このプラグインは Accelerated Mobile Pages (アクセラレーテッド・モバイル・ページ、AMP) プロジェクトへのサポートを追加します。AMP は、どこからでも素早く読み込めるモバイルに最適化したコンテンツの提供を目指すオープンソースイニシアチブです。

プラグインを有効化すると、サイトの全投稿に対する AMP 互換バージョンのページが生成されます。このページは投稿 URL の末尾に /amp/ を追加するとアクセスできます。例えば投稿 URL が http://example.com/2016/01/01/amp-on/ であれば、AMP バージョンは http://example.com/2016/01/01/amp-on/amp/ で表示できます。サイトで Pretty パーマリンクが無効になっている場合、末尾に ?amp=1 を追加すれば同様になります。例: http://example.com/2016/01/01/amp-on/?amp=1

Note #1: that Pages and archives are not currently supported. Pages support is being worked on.

注2: このプラグインは AMP コンテンツ生成のみを行い、モバイル端末からの訪問者に対して自動的に表示を切り替えるものではありません。後者は Google 検索などの AMP コンシューマーによって処理されます。詳しくは AMP Project FAQ をご覧ください。

https://github.com/Automattic/amp-wp で開発状況を確認するか、このプラグインの開発に貢献してください。

スクリーンショット

インストール

  1. フォルダーを /wp-content/plugins/ ディレクトリにアップロード
  2. WordPress の「プラグイン」メニューからプラグインを有効化
  3. You may need to refresh your permalinks by going to Settings > Permalinks and tapping the Save button.

FAQ

自分のサイトの AMP 出力をカスタマイズするには ?

You can tweak a few things like colours from the AMP Customizer. From the Dashboard, go to Appearance > AMP.

For deeper level customizations, please see the readme at https://github.com/Automattic/amp-wp/blob/master/readme.md

What about ads and shortcodes and such?

https://github.com/Automattic/amp-wp/blob/master/readme.md#handling-media をご覧ください。

What about analytics?

Many plugins are adding AMP support already. If you handling analytics yourself, please see https://github.com/Automattic/amp-wp/blob/master/readme.md#analytics

Google Webmaster Tools is reporting validation errors for my site. How do I fix them?

The best place to start is to open a new discussion in the support forum with details on what the specific validation error is.

Why aren’t Pages supported yet

A wise green Yoda once said, “Patience you must have, my young padawan.” We’re working on it 🙂

評価

No Adsense Support & Adds WordPress link

Very dissapointing that Automatic appear not to be updating this plugin.

There is no adsense support so if you start using AMP you will need to edit the code yourself to reintroduce your Adsense code – very unsatisfactory.

Also, the plugin adds a link at the bottom of every page to wordpress.org – WHY?!

Come on Automatic get your act together

Broke my site, unfortunately

The plugin created a beautiful /amp version of all my blog posts, but unfortunately these pages did not trigger on mobile, and it slightly off-centered many elements site-wide, which can not be fixed.

It DID work just fine on another site I built which uses a different theme, so the theme might have something to do with it. Again, though it didn’t mess up the layout of this second site, it still does not trigger the amp versions of the pages (maybe this takes time?).

60% of my AMP posts have Critical issues

I use this plugin and Yoast’s Glue AMP Plugin. Automattic (this plugin creator) has been an amazing part of my web experience in the past.

3/22/07 update: Now just under 20% of my posts have critical issues. I think the fact that I added text (a phone number) in the Yoast glue plugin where the design header is may have caused the critical error issue.

Update after I initially post this: When I manual do the Google AMP test on a few randomly chosen on AMP URLS (for which Webmaster tools said they had errors just 1 hour ago), Google says each Valid AMP page.

Per Google Webmaster Tools yesterday, 60% of my AMP posts had critical issues. Prior to the update above, I expect this % to rise.

Each post has these 5 critical issues

Issue Severity Pages with issues
1 AMP markup missing or incorrect Critical
2 User-authored JavaScript found on page Critical
3 Prohibited or invalid use of HTML Tag Critical
4 Syntax error Critical
5 Invalid usage of AMP tags Critical

Worse yet, the Google search AMP tester froze when seeing if this page is AMP friendly.

I use a Genesis WP framework that I virtually haven’t altered, so if there is a site that this plugin should work on, it would be mine. However, it doesn’t.

I would be willing to pay for a premium version of this plugin that has support. This plugin’s support requests in the past 5 or so months haven’t been responded to.

I am grateful that the authors of this plugin took the time to make it. However, it concerns me that the WP plugin repository says this plugin (and Yoast’s Glue for AMP plugin) hasn’t been updated in 5 months or so.

Best Plugin for AMP

To set google analytics statistics and amp ad code ( adsense) on the page, use this helper plugin – Head, Footer and Post Injections

Work with WP 4.7.3 and SSL support, PHP 7.1
Pass validation on AMP validator
Compatible with WP fastest cache

I installed all the necessary codes according to the instructions from Google and everything works, all the pages are tested in the validator, zero errors.
Many thanks to the authors of the plugin.

Never install the plug-in side, when checking other known like (AMP for WP – Accelerated Mobile Pages, AMP Supremacy, WP AMP – Accelerated Mobile Pages for WordPress, Better AMP – WordPress Complete AMP) got in the validator errors.
These errors are not eliminated by other plugins, they just pile up, the result of your pages disappear from the google.

109件のレビューをすべて表示

貢献者と開発者

“AMP” is open source software. The following people have contributed to this plugin.

貢献者

“AMP” has been translated into these 10 locales: French, Turkish, German, Brazilian Portuguese, Spanish, Italian, Dutch, Chinese (Taiwan), English (UK), English (Australia). Thank you to the translators for their contributions.

Translate “AMP” into your language.

Interested in development?

Browse the code or subscribe to the development log by RSS.

変更履歴

0.4.2 (2016-10-13)

  • Fix: Prevent validation errors for html tag (h/t Maxime2 and everyone else that reported this error)
  • Fix: Handle variable name conflict that was causing content_max_width to be ignored (h/t mimancillas)
  • Fix: Prevent errors when nodes don’t have attributes (h/t stephenmax)
  • Fix: Back-compat for 4.5 (add sanitize_hex_color function, h/t xotihcan)
  • Fix: Handle gif featured images (h/t protocolil)
  • Documentation updates (props troyxmccall)

0.4.1 (2016-10-10)

  • Fix: Don’t fire the_content for featured image output
  • Fix: Don’t show comment link when disabled and no comments on post (h/t neotrope)
  • Fix: strip !important from inline styles (h/t compointdesigner and enriccardonagmailcom)

0.4 (2016-10-06)

  • New template: spiffy, shiny, and has the fresh theme smell (props allancole and the Automattic Theme Team).
  • Warning: The template update has potential breaking changes. Please see https://wordpress.org/support/topic/v0-4-whats-new-and-possible-breaking-changes/
  • AMP Customizer: Pick your colours and make the template your own (props DrewAPicture and 10up)
  • Fix: support for inline styles (props coreymckrill).
  • Fix: no more fatal errors when tags not supported by post type (props david-binda)
  • Fix: no more unnecessary <br> tags.
  • Fix: sanitize children of removed nodes (like empty <a> tags) (props Maxime2).
  • Fix: no more broken YouTube URLs with multiple ?s.
  • Fix: properly handle tel and sms schemes (h/t soundstrategies).
  • Fix: remove amp endpoint on deactivate.
  • New filter: amp_pre_get_permalink if you want a completely custom AMP permalink.

0.3.3 (Aug 18, 2016)

  • Handle many more validation errors (props bcampeau and alleyinteractive).
  • New filter: amp_post_template_dir (props mustafauysal).
  • New template: Nav bar is now it’s own template part (props jdevalk).
  • Better ratio for YouTube embeds.
  • Fix: better timezone handling (props rinatkhaziev).
  • Fix: better handling of non-int dimensions (like 100%).
  • Fix: better handling of empty dimensions.
  • Fix: autoplay is a bool-like value.
  • Fix: breakage when using the query_string hook (h/t mkuplens).
  • Fix: don’t break really large Twitter IDs.
  • Fix: don’t break Instagram shortcodes when using URLs with querystrings.
  • Readme improvements (props nickjohnford, sotayamashita)

0.3.2 (Mar 4, 2016)

  • Jetpack 統計情報に対応。
  • Better version of Merriweather and use system fonts for sans-serif (props mattmiklic).
  • Move font to stylesheet so it can be more easily overridden (props mattmiklic).
  • Fix: Template loading issues on Windows. (Thanks to everyone who reported this, especially w33zy for pointing out the validate_file issue.)
  • Fix: don’t run AMP on post comment feeds (props kraftbj).
  • Fix: un-break pagination when using a static home page with multiple pages.
  • Fix: force amp-iframe to use https to validate correctly (props mister-ben).
  • Fix: validation for target and video/audio attributes.
  • Fix: clipped images in galleries (thanks tobaco).

0.3.1 (Feb 24, 2016)

  • Allow custom query var (props vaurdan).
  • Fix AMP URLs for non-pretty permalinks (props rakuishi).
  • パスワード保護された投稿向けの修正。
  • Fix dimension extraction for schema-less or relative image URLs.
  • Better fallback for images with no dimensions.
  • Validation fixes for a tags (props kraftbj).
  • Updated AMP boilerplate.
  • Allow on tags for elements (props Steven Evatt).
  • Prefixed class names.

0.3 (Feb 18, 2016)

  • Fetch dimensions for hotlinked images.
  • amp-facebook サポートを追加。
  • Add some new actions and filters (e.g. amp_init).
  • Fix validation errors for [gallery] shortcodes.
  • Fix issues with path validation on Windows.
  • Fix issues with really squeezed layout.
  • Breaking change: style.css no longer contains the ` tag. If you have a custom stylesheet, you need to update it to remove the tag.
  • Breaking change: single.php no longer includes the AMP boilerplate styles. They are instead added via the amp_post_template_head hook. If you have a custom template, please remove the boilerplate styles.

0.2 (Jan 28, 2016)

  • 非常に多数の互換性および妥当性対応修正
  • 非常に多数のカスタマイズ性改善

0.1

  • 最初のバージョン