嵌入 BuzzSprout 的播客

你好,Nathan,

步骤如下:

  1. 进入管理控制台,搜索“允许的 iframe”。

  2. 添加 https://www.buzzsprout.com,然后点击勾选标记以保存更改。

  3. 将以下内容添加到你的帖子中:

    <div data-theme-iframe="no-scroll">
    <iframe src="https://www.buzzsprout.com/1717287/8537076?client_source=small_player&amp;iframe=true&amp;referrer=https://lacomunidad.deliberatespanish.com?player=small" width="100%" height="200" frameborder="0" scrolling="no"></iframe>
    </div>
    

周围的 <div> 是可选的,但我使用它是因为我不希望我的 iframe 中出现滚动条。如果你想启用滚动条,需要再执行两个步骤:

  1. 进入你的当前主题,点击“编辑 CSS/HTML”,然后选择 </head> 标签页。
  2. 粘贴以下内容并保存:
    <script type="text/discourse-plugin" version="0.8.42">
      api.decorateCookedElement(post =>
        post.querySelectorAll('div[data-theme-iframe="no-scroll"] iframe').forEach(iframe => {
          iframe.setAttribute('scrolling', 'no');
        }),
        { 
          id: 'iframe-decorator',
          onlyStream: true,
        }
      );
    </script>