指向 AMP 文章中其他 AMP 页面的链接 [英] links to other AMP pages in an AMP article

查看:26
本文介绍了指向 AMP 文章中其他 AMP 页面的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个主题中有多个非 AMP 网页.我的非 AMP 页面将在文章正文中包含指向同一主题中其他非 AMP 页面的链接.页面的 AMP 版本是否应该链接到同一主题中的其他 AMP 页面,还是文章中的所有链接都应该指向页面的非 AMP(规范)版本?

I have several non-AMP pages within a topic. My non-AMP pages will have links within the body of the article to other non-AMP pages in the same topic. Should the AMP versions of the pages link to the other AMP pages in the same topic or should all links in the articles point to the non-AMP (canonical) versions of the pages?

Using the following link formats for the example:  
Non-AMP version: /muffins/blueberry/  
AMP version: /muffins/blueberry/amp/

/muffins/blueberry/ 链接到 /muffins/strawberry/
/muffins/blueberry/amp/应该链接到/muffins/strawberry/amp/还是/muffins/strawberry/?

/muffins/blueberry/ has a link to /muffins/strawberry/
Should /muffins/blueberry/amp/ link to /muffins/strawberry/amp/ or to /muffins/strawberry/?

或者换句话说,如果访问者通过 AMP 页面访问您的网站,您是继续向他们提供指向您页面的其他 AMP 版本的链接还是应该尽快将它们切换到完整页面?

Or said another way, if a visitor comes to your site on an AMP page, do you continue to offer them links to other AMP versions of your pages or should you switch them over to the full pages as soon as possible?

推荐答案

据我所知,这由您决定,因为文档中没有任何地方声明我们必须有指向一个或另一个的链接.如果有帮助,我们决定将 AMP 页面中的所有链接链接回规范页面,我们的页面在轮播中显示得非常好.

As far as I know, it is up to you to decide since no where in the docs does it state that we must have links leading to one or the other. If it helps, we decided to have all links within the AMP page link back to the canonical page and our pages are appearing in the carousel perfectly fine.

如果您查看 AMP HTML 规范,它只会指出链接不能以 javascript: 开头.

If you look at the AMP HTML Specs, it only states that links cannot begin with javascript:.

这篇关于指向 AMP 文章中其他 AMP 页面的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆