
上QQ阅读APP看书,第一时间看更新
Including the AMP-JS library
The very first step in converting any page to AMP will be to include the AMP-JS library in the page. This is an important first step since the AMP library includes development tools that will guide us as we build our AMP pages.
To include the AMP-JS library, simply add the following line within the <head> tag of your markup:
<script async src="https://cdn.ampproject.org/v0.js"></script>
If you open your developer tools console in any modern browser, you should see a line of AMP-specific output:
Powered by AMP HTML
This means the AMP-JS library has loaded and our journey to ride the AMP lightning has truly begun!