hi,
i am trying to understand how to implement AMP code in AEM.
i have predeveloped sites.
and i don't want to create separate components for AEM.
so how will i modify existing components and templates.
what is the relation between content fragment and AMP pages?
if anyone can give me example or video to refer that will be great.
Solved! Go to Solution.
Views
Replies
Total Likes
There are certain design/architecture related decisions which you/your team would need to make based on your specific requirements weighing the pros/cons & constraints of each solution. These constraints/decisions are pre-requisite to drill down further on a particular solution and answer the questions that you currently have.
Here is an old link that explains about AMP pages in detail and provide options to host/configure:
https://moz.com/blog/accelerated-mobile-pages-whiteboard-friday
Live AMP page example:
Normal article - Stacey Abrams to deliver Democrats' State of the Union response – live | US news | The Guardian
just append (/amp - custom route path) to the normal article page url to get the AMP page url
Same article in AMP version - Stacey Abrams to deliver Democrats' State of the Union response – live | US news | The Guardian
Even if you squeeze the browser to get responsive site on desktop, you can still notice the difference in markup for normal page vs AMP page - E.g. check the ROOT element <html AMP> vs <html>
Compare the the metadata and markup of AMP page and normal page especially how it is linked by "rel=amphtml" - <link rel="amphtml" href="https://amp.theguardian.com/us-news/live/2019/jan/29/trump-roger-stone-mueller-news-live-latest-upda...">
In the above example, they have chosen to host the amp pages via a separate domain. You could follow the same solution, its probably the easiest path unless you have business/technical constraints. Alternatively, you could use the same existing domain (and use either same or different urls based on feasibility assessment) to host both AMP and non-AMP pages - if you choose the latter option, then, you would need to iron out the design for a lot of aspects including SEO/caching/content rendering/routing of mobile traffic to these AMP pages etc.
Whatever approach you take, you would need to design the end-to-end process flow for:
Coming back to AEM pieces, in my mind,
so does that mean separate template components needs to be developed? -- preferably yes unless you want to tweak your existing components to support both use cases (make them generic) and just develop the new components to inject the AMP specific markup in the page
is it possible to do with single content or with same component? -- yes it could be possible based on the design approach you choose and your existing implementation. E.g. suppose that one of your existing component has just <ol><li> tags as markup which works well with AMP then the same component could be used for both AMP and non-AMP pages. Another component doesn't have a <link> tag required by AMP pages then its up to how you want to fix it - either create a new component or use conditional logic or inject it or something else
and how url will be configured? -- that depends on your design approach
do i have to provide separate url for mobile? -- that depends on your design approach
how can i make sure that AMP based page will not be visible in desktop search results and vise versa. -- search engines are smart enough to index it appropriately if you've configured proper tags based on AMP guidelines
do i have to make any firewall level changes for this? -- that depends on your design approach
Views
Replies
Total Likes
To me, AMP pages can be considered as normal AEM pages with customized markup. Coming to your question, per my knowledge, there are a lot of pieces to it.
This article shared a high level approach to achieve it - Accelerated Mobile Pages (AMP) strategy/ implementation for AEM - Stack Overflow
In addition to that, you could convert existing components to AMP specific markup - https://www.ampproject.org/docs/getting_started/quickstart#converting-existing-content?
Based on your design, you could either create global content fragments or AMP/channel specific fragments and render them as per use case.You might have to create specific template(s)/components to achieve the custom markup that is required by AMP pages. Just keep in mind that if you have any custom components already built-in for existing site that do not go along with content fragments design principles, then, you may to customize a ton of stuff. If you plan to share content with non AMP site as well then one of the solutions could be to use the selector based approach as mentioned in above link.
Views
Replies
Total Likes
Some information on this thread -- Accelerated Mobile Pages (AMP) support in AEM
Views
Replies
Total Likes
Hi,
Thanks for your revert.
Suppose I am working only on specific pages of my existing site.
like home page, about us, contact us etc.
that it should render as AMP page in AEM.
so does that mean separate template components needs to be developed?
is it possible to do with single content or with same component?
and how url will be configured?
do i have to provide separate url for mobile?
how can i make sure that AMP based page will not be visible in desktop search results and vise varsa.
do i have to make any firewall level changes for this?
Views
Replies
Total Likes
There are certain design/architecture related decisions which you/your team would need to make based on your specific requirements weighing the pros/cons & constraints of each solution. These constraints/decisions are pre-requisite to drill down further on a particular solution and answer the questions that you currently have.
Here is an old link that explains about AMP pages in detail and provide options to host/configure:
https://moz.com/blog/accelerated-mobile-pages-whiteboard-friday
Live AMP page example:
Normal article - Stacey Abrams to deliver Democrats' State of the Union response – live | US news | The Guardian
just append (/amp - custom route path) to the normal article page url to get the AMP page url
Same article in AMP version - Stacey Abrams to deliver Democrats' State of the Union response – live | US news | The Guardian
Even if you squeeze the browser to get responsive site on desktop, you can still notice the difference in markup for normal page vs AMP page - E.g. check the ROOT element <html AMP> vs <html>
Compare the the metadata and markup of AMP page and normal page especially how it is linked by "rel=amphtml" - <link rel="amphtml" href="https://amp.theguardian.com/us-news/live/2019/jan/29/trump-roger-stone-mueller-news-live-latest-upda...">
In the above example, they have chosen to host the amp pages via a separate domain. You could follow the same solution, its probably the easiest path unless you have business/technical constraints. Alternatively, you could use the same existing domain (and use either same or different urls based on feasibility assessment) to host both AMP and non-AMP pages - if you choose the latter option, then, you would need to iron out the design for a lot of aspects including SEO/caching/content rendering/routing of mobile traffic to these AMP pages etc.
Whatever approach you take, you would need to design the end-to-end process flow for:
Coming back to AEM pieces, in my mind,
so does that mean separate template components needs to be developed? -- preferably yes unless you want to tweak your existing components to support both use cases (make them generic) and just develop the new components to inject the AMP specific markup in the page
is it possible to do with single content or with same component? -- yes it could be possible based on the design approach you choose and your existing implementation. E.g. suppose that one of your existing component has just <ol><li> tags as markup which works well with AMP then the same component could be used for both AMP and non-AMP pages. Another component doesn't have a <link> tag required by AMP pages then its up to how you want to fix it - either create a new component or use conditional logic or inject it or something else
and how url will be configured? -- that depends on your design approach
do i have to provide separate url for mobile? -- that depends on your design approach
how can i make sure that AMP based page will not be visible in desktop search results and vise versa. -- search engines are smart enough to index it appropriately if you've configured proper tags based on AMP guidelines
do i have to make any firewall level changes for this? -- that depends on your design approach
Views
Replies
Total Likes