Streaming live at 10am (PST)

Add AMP discovery tag to <head> for CMS

Hi,
I want to add AMP discovery tag to all the blogs in the CMS Collections section.
Sample discovery tag (just before )

Given HTML embed’s aren’t supported on CMS yet (ref: HTML embed element is missing in CMS Collection Fields), are there any other options I can use to add the tag?

Note that I cannot use javascript to render the tag in head, so it needs to be added manually, and that’s okay for now.
AMP discovery tag reference: https://amp.dev/documentation/guides-and-tutorials/optimize-and-measure/discovery/

Thoughts?

Webflow does not currently support AMP.

@webdev: I am not looking for AMP support for WebFlow, but I am looking towards ability to add a custom tag in the section of blog pages.
Is there a way to make this happen?

@anurag if you go to the Page settings of your CMS Blog Template, and scroll down to custom code, you can add your canonical links, use the +Add Field option (top right) to make the canonical link unique per blogpost, e.g add the slug field at the end of the URL. Also you can add the script from scheme.org in the same area and replace parameters with fields from the CMS, if needed add the specific fields to the CMS.

@ErikVanderlaan: thx for the quick reply, I do have few questions. for original URL:


the corresponding AMP discovery tag will be:

The “add field” drop down (top right) that you suggested doesn’t allow me to replace the canonical link with AMP equivalent.
aka:

I followed your instructions, and I am stuck on the part where I can take the “canonical” link and replace it with AMP equivalent.
https://www.boundery.com/blog replace with AMP counterpart https://amp.boundery.com/blog

Any thoughts/suggestions on that?

@anurag in line 1 i have the line for the standard canonical link for a blog post.

in Line 3 i have the link in the way you want. You can just type it in. Only the variable part is in the slug.
I hope this helps

@ErikVanderlaan: thank you very much. This is exactly what I was looking for. :heart_eyes:

1 Like