0

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}}">
foobar
  • 571
  • 1
  • 5
  • 20

1 Answers1

1

Generate amp and non-amp pages....copy url from browser and insert those urls accordingly in both links

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 07 '22 at 09:26