- 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>
推薦閱讀
- CockroachDB權威指南
- 微信公眾平臺開發:從零基礎到ThinkPHP5高性能框架實踐
- 用Flutter極速構建原生應用
- Eclipse Plug-in Development:Beginner's Guide(Second Edition)
- Flutter跨平臺開發入門與實戰
- Angular開發入門與實戰
- 大數據分析與應用實戰:統計機器學習之數據導向編程
- Learning OpenStack Networking(Neutron)(Second Edition)
- GameMaker Essentials
- 深入實踐DDD:以DSL驅動復雜軟件開發
- 大學計算機應用基礎(Windows 7+Office 2010)(IC3)
- C語言程序設計
- jQuery Mobile Web Development Essentials(Second Edition)
- 軟件設計模式(Java版)
- iOS Development with Xamarin Cookbook