使用Livefyre API将Google AMP功能添加到Storify 2页面,以保持内容的交互性和SEO友好性。
要将Google AMP与Storify 2一起使用,您必须为Storify 2应用程序创建一个包含Google AMP标记的页面。
App的AMP版本从原始页面请求更新(使用amp-live-列表 API中的pollInterval参数设置更新请求的间隔)。 要确保AMP页面上的访客能快速获得最新内容,请在Storify 2 AMP页面上保留低缓存TTL。
作为帖子包含在Storify 2应用程序中的非图像资产(例如,视频)必须使用HTTPS(由AMP规范指定)。 使用Google Cloud Content投放网络(CDN)的AMP URL使用HTTPS。
将Google AMP与Storify 2结合使用:
<style amp-custom>
标记中,将以下Storify 2 AMP页面的内容包含到Storify 2页面的CSS中:https://cdn.livefyre.com/libs/liveblog-v2-component/amp.min.csshttps://api.livefyre.com/app-service/v4/bootstrap/{{APP_ID}}/amp
其中{{APP_ID}}是Livefyre Studio中Storify 2应用程序的应用程序ID。