Я создал образец статьи для тестирования Страница AMP .
Структурированный код AMP
<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>
Но при тестировании на Тест структурированных данных Google
Снимок экрана
Я не могу просмотреть кнопку предварительного просмотра, чтобы увидеть результат в реальном времени.
Репозиторий GitHub: https://github.com/jitangupta/amp/!