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

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
主站蜘蛛池模板: 孝昌县| 新沂市| 安化县| 忻城县| 南江县| 包头市| 滕州市| 遵义市| 灵山县| 安顺市| 西和县| 岳池县| 新安县| 原阳县| 翁源县| 宁城县| 隆子县| 东阳市| 双辽市| 济南市| 垫江县| 临夏市| 瓦房店市| 石首市| 长子县| 泾阳县| 石景山区| 平邑县| 北安市| 山东| 固镇县| 托里县| 江西省| 都江堰市| 怀远县| 鹤峰县| 黔西县| 皮山县| 车致| 平邑县| 若尔盖县|