Jitan Gupta
Jitan Gupta

Reputation: 484

Not able to see Preview Button while testing AMP Page

I have created a sample article to test AMP page.

Structured AMP Code

<script type="application/ld+json">
        {
        "@context": "http://schema.org",
        "@type": "NewsArticle",
        "mainEntityOfPage": {
        "@type": "WebPage",
        "@id": "https://www.c-sharpcorner.com/article/creating-web-api-using-code-first-approach-in-entity-framework/"
        },
        "headline": "Creating Web API Using Code-First Approach In Entity Framework",
        "image": {
        "@type": "ImageObject",
        "url": "https://jitangupta.github.io/amp/helpful-images/aritcle-entity-framework.gif",
        "height": 800,
        "width": 800
        },
        "datePublished": "2017-05-16T08:00:00+08:00",
        "dateModified": "2015-05-16T09:20:00+08:00",
        "author": {
        "@type": "Person",
        "name": "Jitan Gupta"
        },
        "publisher": {
        "@type": "Organization",
        "name": "csharpcorner",
        "logo": {
        "@type": "ImageObject",
        "url": "https://csharpcorner-mindcrackerinc.netdna-ssl.com/App_Themes/CSharp/Images/SiteLogo.png",
        "width": 600,
        "height": 60
        }
        },
        "description": "In this article, we will create a database with a foreign key constraint (one to many relationship), using Code First technique in an Entity Framework, seed some sample data and return the data, using the Web API."
        }
</script>

But while testing it on Google Structured Data Test

Screenshot

I am not able to view the preview button to see the real time result.

GitHub Repo : https://github.com/jitangupta/amp/!

Upvotes: 0

Views: 89

Answers (2)

Nisarg
Nisarg

Reputation: 367

It looks like, there is different output depending upon the "@type" attribute. With "@type": "Recipe" you will be able to "Preview" and with other like "Product", "NewsArticle", there is no preview option. Read 2nd point's Tip here : https://developers.google.com/search/docs/guides/prototype

Upvotes: 1

Elsa
Elsa

Reputation: 83

I think that the problem is that your page is not a valid AMP page. You can validate it using the validator: https://validator.ampproject.org

In order to preview your page you should use this one: https://search.google.com/test/amp This preview option will be displayed once your page is a valid one.

Upvotes: 0

Related Questions