- AMP:Building Accelerated Mobile Pages
- Ruadhan O'Donoghue
- 167字
- 2021-07-08 10:03:56
Optional but recommended boilerplate
The following items are not required in AMP pages, but are recommended so that you get the most SEO benefit from your web pages:
- Title tag: Title tags are used as a ranking signal in search engines, and are useful to users in identifying pages. You can add the title tag right after the AMP-JS <script> tag:
<title>Hello World!</title>
- Structured metadata: Adding structured metadata allows third-party services to more efficiently index and preview your pages. For example, Facebook uses the Open Graph Protocol, while Twitter uses Twitter Cards, to extract images and specific data about your page. Additionally, Google's Top Stories Carousel supports the schema.org Article and Video categories to generate article previews such as the ones shown in the next section.
To get a structured metadata preview of your page in Google search results, you need to add code similar to this to the head of your page:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "NewsArticle",
"headline": "Article headline",
"image": [
"thumbnail1.jpg"
],
"datePublished": "2017-03-01T08:00:00+08:00"
}
</script>
推薦閱讀
- Spring Boot 2實戰之旅
- JavaScript前端開發模塊化教程
- 計算思維與算法入門
- Learning Spring 5.0
- Spring技術內幕:深入解析Spring架構與設計
- 樂高機器人設計技巧:EV3結構設計與編程指導
- Cassandra Design Patterns(Second Edition)
- 精通軟件性能測試與LoadRunner實戰(第2版)
- 鋒利的SQL(第2版)
- NGUI for Unity
- 深入淺出Python數據分析
- Mastering Embedded Linux Programming
- 精通Spring:Java Web開發與Spring Boot高級功能
- 虛擬現實建模與編程(SketchUp+OSG開發技術)
- ASP.NET本質論