2017 © Pedro Peláez
 

project amp-validator

Test your Accelerated Mobile Pages right away from your terminal.

image

jeffochoa/amp-validator

Test your Accelerated Mobile Pages right away from your terminal.

  • Sunday, July 22, 2018
  • by jeffer8a
  • Repository
  • 2 Watchers
  • 7 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

AMP validation Example , (*1)

Total Downloads Latest Version License , (*2)


About AMP validation CLI tool

Test your Accelerated Mobile Pages right away from your terminal., (*3)

AMP online validation tool, (*4)

This package uses CLOUDFARE's AMP validator API., (*5)

Installation

Via Composer

composer global require jeffochoa/amp-validator

Manually

First, download the binary using wget:, (*6)

wget https://github.com/jeffochoa/amp-validator/blob/master/builds/amp-validator -O amp-validator

Change binary permissions:, (*7)

sudo chmod ax amp-validator

Move to bin directory:, (*8)

sudo mv amp-validator /usr/local/bin/amp-validator

Usage

amp-validator

Singe page validation

The given URL should be publicly accessible., (*9)

amp-validator validate http://website.test/valid-amp-link

You can use the generated CSV report by Google Webmaster Tools (GWT) as input to validate locally., (*10)

AMP online validation tool, (*11)

Go to https://www.google.com/webmasters/tools/accelerated-mobile-pages, (*12)

Download the AMP report in Search Appearance / Accelerate mobile pages, (*13)

Once you have the file downloaded locally:, (*14)

amp-validator validate-batch path-to-file/downloaded.csv

This tool will read the CSV file generated on GWT to run the validation on each tests contained in the file, then you can select between the different types of output formats to export your report., (*15)


Please select an output format ---------------------------------------------------------------------------------- ● Export to CSV file ○ In console (summarized) ○ In console (extended) ○ Cancel

Extra help to fix the errors in your page

The following example is the output generated using the "In console (extended)" option:, (*16)

-----------------------------------------------------------------------------------
| Key     | Value                                                                    |
-----------------------------------------------------------------------------------
| link    | https://you-given-url.test                                               |
| error   | The attribute 'target' in tag 'a' is set to the invalid value 'blank'.   |
| line    | 1221                                                                     |
| col     | 3                                                                        |
| code    | INVALID_ATTR_VALUE                                                       |
| help    | https://www.ampproject.org/docs/reference/spec#links                     |
| preview | https://search.google.com/test/amp?url=https://you-given-url.test        |
------------------------------------------------------------------------------------

If you click on the preview link, you'll be taken to the online google validation tool., (*17)

AMP online validation tool, (*18)

License

AMP Validator is an open-sourced software licensed under the MIT license., (*19)

The Versions

22/07 2018

dev-master

9999999-dev

Test your Accelerated Mobile Pages right away from your terminal.

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

The Development Requires

by Jefferson Ochoa

laravel framework console cli amp laravel zero

22/07 2018

v1.0.1

1.0.1.0

Test your Accelerated Mobile Pages right away from your terminal.

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

The Development Requires

by Jefferson Ochoa

laravel framework console cli amp laravel zero

20/07 2018

v1.0.0

1.0.0.0

Test your Accelerated Mobile Pages right away from your terminal.

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

The Development Requires

by Jefferson Ochoa

laravel framework console cli amp laravel zero