CodeIgniter Forums

Full Version: Your best suggestions to implement Google AMP ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello Wonderful Community ! 

I'm interested regarding what's the best solution to implement Google AMP in a Codeigniter structure ?

In a nutshell, the concept is to have another version of your HTML (mainly) matching all the AMP specs and easily-access through a suffixed url like www.yoursite.com/yourpage/amp 
The specs : https://www.ampproject.org/docs/fundamentals/spec
For example <img tag must become <amp-img, image URL must contains a pre-url of a CDN, etc. 

How would you do that ? What will be the best solution ? 
I hope Cloudflare will have an automatic convert tools for that, but that's not the case unfortunately.

If some people here already implemented that, I will be happy to hear what choice they did. And if you didn't do that already, I'm interested about your opinion too ! 

Thanks a lot Smile
Try searching this forum for Ampproject because I have posted quite a few solutions as to how I implemented Ampproject and CodeIgniter.

My first post was way back in March 2016. Smile

Remember to install the Ampproject browser plugin because W3.org validations do not work.
(03-22-2019, 01:56 AM)John_Betong Wrote: [ -> ]Try searching this forum for Ampproject because I have posted quite a few solutions as to how I implemented Ampproject and CodeIgniter.

My first post was way back in March 2016. Smile

Remember to install the Ampproject browser plugin because W3.org validations do not work.

Oh thanks a lot John ! My first move was to research "AMP" on the forum but I got a ton of answers with LAMP / XAMP / etc  Big Grin
I will try now with "ampproject" ! Thanks a lot !! Heart
(03-22-2019, 01:56 AM)John_Betong Wrote: [ -> ]Try searching this forum for Ampproject because I have posted quite a few solutions as to how I implemented Ampproject and CodeIgniter.

My first post was way back in March 2016. Smile

Remember to install the Ampproject browser plugin because W3.org validations do not work.

OK so I found 2 threads with 0 reply :

https://forum.codeigniter.com/thread-64759.html
https://forum.codeigniter.com/thread-65813.html

But it doesn't really help me because it just explains what AMP is. I'm rather looking for a solution to convert HTML to AMPHTML easily. For example through the cache output, making another AMP cache, through a converting library or something like that.

because when you have a project with millions of page, you can not really just do it manually...
(03-22-2019, 02:18 AM)Coool6 Wrote: [ -> ]
(03-22-2019, 01:56 AM)John_Betong Wrote: [ -> ]Try searching this forum for Ampproject because I have posted quite a few solutions as to how I implemented Ampproject and CodeIgniter.

My first post was way back in March 2016. Smile

Remember to install the Ampproject browser plugin because W3.org validations do not work.

...
...
But it doesn't really help me because it just explains what AMP is. I'm rather looking for a solution to convert HTML to AMPHTML easily. For example through the cache output, making another AMP cache, through a converting library or something like that.

because when you have a project with millions of page, you can not really just do it manually...



Was CodeIgniter used to generate the "project with millions of pages"?

If the above is true then no doubt a Controllers would have be used to extract data from a database Model and passed to a View to create the final web-pages. 

If the above is true then the same data can be used to generate am AmpProject compatible View.

Have you actually used CodeIgniter to generate a valid AmpProject web-page? 

If the generated web-page does not conform to the strict validation rules then Google will not optimise the web-page and not give it preferential SEO treatment.
Accelerated Mobile Pages is an initiative from Google to improve your user's mobile browser experience. Google wants to make pages easy for developers to implement, enable monetization and embrace the open web UPSers Employee Login