![]() This is a useful way to ensure any customisations you make to your AMP template are valid and your AMP content is rendering correctly. There is an effective way to validate your AMP pages as you go directly in the console by adding #development=1 to any AMP URL. It must be wrapped in an tag and must provide a width and height property. When outputting the post, you can use a block expression ( helper. As with all contexts in Ghost, all of the global data is also available. The amp context provides access to the post object which matches the route. The 2.0 version of the plugin makes an emphasis on providing options for users that are non technical but still want to take advantage of AMP to bring great page experiences to their users. ├── index.hbs └── post.hbs └── amp.hbs └── package.json Ĭheck out the default template in full. We are crafting it with an audience in mind that covers both technical and non-technical users, Google Developer Advocate Alberto Medina said. Ghost will look for this template within your theme files and use this by default. The amp context always uses the amp.hbs template. The parent post also has a canonical link to it’s AMP equivalent. To access any post rendered using the amp.hbs template on your site, add /amp/ to the end of any post URL on your publication. These templates are designed to help you get your AMPed website off the ground in a matter of hours instead of days, weeks or months. Hit save and you’ll have successfully installed AMP Analytics □ Customise the template with your own stylesĪMP in Ghost can be styled to suit your brand and theme too! Since the Ghost theme layer is entirely customisable, that means you can also customise the way your AMP pages are rendered by including a custom amp.hbs template file in your theme. ![]() If you’d like to track your AMP performance in Google Analytics, you can integrate AMP Analytics in a few simple steps, by entering your Google Analytics Tracking ID in your integrations settings: When enabled, all posts on your publication will automatically have an AMP page, with a canonical link to ensure the page is correctly identified by the search engines and no duplicate content issues are found. The AMP integration in Ghost is enabled by default, but if you prefer not to use the feature then you can turn it off in the settings within Ghost Admin. Here's an AMP page demo Enabling AMP in Ghost ![]() Ghost has a beautiful default AMP template which displays all of your content, images, galleries, code and bookmark cards for mobile devices. This template transforms each post on your site into an AMP version which can be accessed by adding /amp to the end of any URL. In Ghost, the AMP integration utilises the AMP framework inside a single Handlebars template: amp.hbs. The open source AMP project is led by Google, and provides a way for publishers to generate lightweight versions of their content for a faster and smoother user experience. Ghost comes with a built-in integration for Google AMP which transforms all of the content on your site into a lightning-fast AMP version ⚡
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |