I followed this and this posts to optimize my Laravel site for Google AMP
. My site shows different views
for different routes. For example, /
will open the index page (after binding several views) and /amp
route will point to an amp version of the index page.
According to AMP Docs, both pages should be inter-linked by canonical
and amphtml
links as:
<link rel="canonical" href="/article.html">
<link rel="amphtml" href="/article.amp.html">
Any idea on giving these links for Laravel blades because I dont have complete .html
pages. Should I add routes here? e.g.
<link rel="canonical" href="{{/}}">
<link rel="amphtml" href="{{/amp}}">