官术网_书友最值得收藏!

Command line validation

If you have Node.js installed on your machine, you can use the command line validation tool to validate both local and remote files. An advantage of this tool is that it can be included in your workflow and deployment process to automatically validate pages, and alert you when unexpected validation failures occur. A process like this will help to ensure that you don't accidentally deploy invalid pages and lose AMP badges and positioning in AMP search results carousels.

You can install the command line validator with the following command:

npm install -g amphtml-validator

To validate a page, use:

amphtml-validator https://theampbook.com

If it validates you will see:

https://theampbook.com: PASS

If there are any validation failures, they are listed just like in the developer console tool:

AMP validation with command line tool
主站蜘蛛池模板: 广宁县| 兴安县| 梅州市| 唐山市| 包头市| 时尚| 商南县| 鹿邑县| 舒城县| 南溪县| 咸阳市| 钦州市| 隆德县| 大冶市| 阿拉善左旗| 两当县| 芜湖市| 车致| 临泉县| 冕宁县| 军事| 定陶县| 襄樊市| 连平县| 巫山县| 临沭县| 苍溪县| 海城市| 克东县| 甘孜县| 留坝县| 邮箱| 新宾| 边坝县| 资中县| 龙口市| 如东县| 桐城市| 吐鲁番市| 洛南县| 东乌珠穆沁旗|