# onebox 中的错误 - 链接被渲染为 Gist，但它不是

**URL:** <https://meta.discourse.org/t/bug-in-onebox-link-being-rendered-as-a-gist-when-it-isnt/202463>\
**Category:** Product Support\
**Created:** [2021 年9 月 2 日 14:30 UTC](https://meta.discourse.org/t/bug-in-onebox-link-being-rendered-as-a-gist-when-it-isnt/202463 "2021-09-02T14:30:10Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

作者： ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)\
发布日期： [2021 年9 月 5 日 09:34 UTC](https://meta.discourse.org/t/bug-in-onebox-link-being-rendered-as-a-gist-when-it-isnt/202463/4 "2021-09-05T09:34:43Z")

</div>

我认为这是 Medium 端的问题。我在所链接文章的源代码中看到了这个规范链接：

```plaintext
<link data-rh="true" rel="canonical" href="https://gist.github.com/139a99b16e8d1fb37b1b3634b14d9052"/>

```

Onebox 库始终遵循规范链接。

其他 Medium 文章的预览生成正常，因此这可能是 Medium 文章中嵌入 Gist 时出现的回归问题。

我们可以将 [medium.com](http://medium.com) 添加到忽略规范标签的域名列表中（[参考链接](https://github.com/discourse/discourse/blob/1472e47aae5bfdfb6fd9abfe89beb186c751f514/lib/onebox/helpers.rb#L10)），@sam，你觉得这样做合适吗？请注意，Medium 允许使用自定义域名，因此这种方法并非在所有情况下都有效。

---

_[View the full topic](https://meta.discourse.org/t/bug-in-onebox-link-being-rendered-as-a-gist-when-it-isnt/202463)._
