Step2:手動でAMPファイルを作成しAMPテストする|Excelソフト

Excel VBAでHTMLファイルをAMP(アンプ)形式に変換するソフト作成

まず前回のAMP形式の変更点に従い、手動で作成してみます。次にGoogleが公開しているAMPテストでチェックします。



Homeに戻る > AMP変換ソフト作成 メニューへ

AMPファイル作成手順

作成するファイルは前回ページ(make40_step1.html)を使います。
  1. AMPフォルダを作成します。 次にその下に元ファイルと同じ構造のフォルダを作成し、その中にコピーしたファイルを変換します。
  2. 文字コードはShift_JISからUTF-8に変換済みです。
  3. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> を <!doctype html> に変更
  4. <HTML> を <html amp lang="ja"> に変更
  5. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> を <meta charset="utf-8"> に変更
  6. <meta name=viewport content="width=device-width, initial-scale=1"> を <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> に変更
  7. <link rel="canonical" href="AMP元ファイルのURL"> を追加
  8. <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> を追加
  9. <script async src="https://cdn.ampproject.org/v0.js"></script> を追加

AMP元ファイルの変更

<link rel="canonical" href="AMPファイルのURL">を追加する

AMPテスト

これでテストを行います。

URLテストを入力し[テストを実行]をクリックするだけですが、ロボットのチェックウィンドウが表示されるので選択してください。 ログインすると表示されないかもしれません。
AMPテスト画面

結果「有効なAMPページではありません」と表示されました。
次に指摘がある2件の問題を修正していきたいと思います。
有効なAMPページではありません


Homeに戻る > AMP変換ソフト作成 メニューへ

■■■
このサイトの内容を利用して発生した、いかなる問題にも一切責任は負いませんのでご了承下さい
■■■
当ホームページに掲載されているあらゆる内容の無許可転載・転用を禁止します


Copyright (c) Excel-Excel ! All rights reserved