# 需要在帖子中包含PGN（国际象棋棋局符号）

**URL:** https://meta.discourse.org/t/need-to-include-pgn-chess-game-notation-in-a-post/157376
**Category:** Feature
**Tags:** pr-welcome
**Created:** [2020年七月10日 16:23 UTC](https://meta.discourse.org/t/need-to-include-pgn-chess-game-notation-in-a-post/157376 "2020-07-10T16:23:32Z")
**Posts on this page:** 1
**Showing post:** 19

<div class="post-metadata">

### Author: ![lucasbasquerotto](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lucasbasquerotto/32/133376_2.png) [@lucasbasquerotto](https://meta.discourse.org/u/lucasbasquerotto)
#### Post date: [2020年八月18日 15:31 UTC](https://meta.discourse.org/t/need-to-include-pgn-chess-game-notation-in-a-post/157376/19 "2020-08-18T15:31:50Z")

</div>

我认为你正在嵌入的网站（[https://lichess.org/）应该将该设置添加到](https://lichess.org/%EF%BC%89%E5%BA%94%E8%AF%A5%E5%B0%86%E8%AF%A5%E8%AE%BE%E7%BD%AE%E6%B7%BB%E5%8A%A0%E5%88%B0) Cookie 中（假设他们希望允许其他网站使用他们的 Cookie）。不过，我不确定 iframe 未显示是否与此有关（通常 Cookie 用于会话或广告，因此即使 iframe 没有会话，我认为它仍应能加载）。

**更新**

看起来他们[允许](https://lichess.org/developers)这样做。

此外，你可以查看预览。如果我在 discourse meta 中直接通过浏览器检查器将 iframe 添加到 HTML 中，它可以正常工作，如下图所示：

 ![chess](https://global.discourse-cdn.com/meta/original/3X/0/c/0cada34ae70deeb6aa1fe13de5b54aab78a802e4.png)

你可以尝试直接在页面上添加它，使用浏览器检查器。如果无法工作，那可能是某些 CSP 规则或 Discourse 阻止了 iframe（如果是 CSP 问题，你应该会在浏览器控制台中看到错误或警告）。

在这里的 meta 上，如果我尝试包含 iframe，也会得到一个空白帖子（尽管我甚至无法看到预览）：

`<iframe src="https://lichess.org/tv/frame?theme=wood&bg=light" style="width: 400px; height: 444px;" allowtransparency="true" frameborder="0"></iframe>`

**更新 2**

**allowed\_iframes** 站点设置可能正是你所需要的（用于允许来自该域的 iframe）：

> [@Supporting iframe embeds from different domains?](https://meta.discourse.org/t/supporting-iframe-embeds-from-different-domains/30930):
>
> I’d like embed iframes from domains outside of instagram, youtube, etc. How would I go about doing that? I noticed some people talk about [GitHub - discourse/onebox: (DEPRECATED) A gem for turning URLs into website previews](https://github.com/discourse/onebox) but it only supports html previews. Thanks! Syed

---

_[View the full topic](https://meta.discourse.org/t/need-to-include-pgn-chess-game-notation-in-a-post/157376)._
