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

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
主站蜘蛛池模板: 岗巴县| 灵武市| 天镇县| 丹凤县| 灵山县| 沙湾县| 普定县| 开化县| 额敏县| 安仁县| 大同县| 襄城县| 华蓥市| 朝阳市| 襄樊市| 黔西县| 安西县| 呼玛县| 西峡县| 容城县| 交城县| 祁阳县| 广东省| 芦溪县| 县级市| 葫芦岛市| 永康市| 扶余县| 睢宁县| 香港| 玉田县| 横山县| 德庆县| 滁州市| 沈丘县| 磐安县| 尖扎县| 保山市| 奉贤区| 微博| 柳州市|