官术网_书友最值得收藏!

Canonical AMP pages

Canonical AMP pages are standalone AMP pages. That is, they serve as both the desktop and the mobile web page. AMP has good media query support, as well as strong responsive layout features, and so AMP isn't mobile-only, rather it's mobile first: It is optimized for mobile, but can be expanded to other device types too. The canonical approach is being promoted by the AMP team, and reflects how much AMP has changed and grown beyond it's original purpose.

To support this, the AMP project runs a dedicated site, AMP Start (ampstart.com), that publishes a set of free-to-use-and-modify canonical AMP page templates, along with pre-built, reusable AMP UI components. These components include styled buttons, input types, annotated hero images, carousels, navigation elements, footers, and many other useful UI components:

One of the free templates available at ampstart.com

It's a good place to start if you're looking for prebuilt, ready-to-use templates and components that you can get up and running quickly. Of course, you're reading this book because you want to learn how to build AMP pages yourself, so we won't go into any more detail about AMP Start here.

With canonical AMP pages, you still need to provide a canonical link in the document head, but it will point to itself:

<link rel="canonical"  />

Note that when building canonical web pages that are intended to be viewed on desktops as well as mobile devices, responsive design techniques become very useful in ensuring that the page scales well on larger screens. We'll see some of these techniques in action in the next few sections of this chapter.

主站蜘蛛池模板: 太湖县| 苍山县| 长海县| 珠海市| 安龙县| 巴林左旗| 吴堡县| 揭阳市| 常熟市| 酒泉市| 长乐市| 大理市| 嘉定区| 四会市| 达孜县| 清水河县| 平乐县| 海晏县| 阿尔山市| 乐平市| 涪陵区| 普安县| 西吉县| 布尔津县| 密山市| 郁南县| 陆河县| 新乡县| 三门县| 兰西县| 湟源县| 内江市| 社旗县| 宁国市| 通榆县| 高台县| 津南区| 招远市| 科技| 确山县| 隆化县|