在 Ghost 中使用已发布的页面作为 iframe

有人知道有什么优雅的方法(或者任何方法)可以在我的一个 Ghost 网站上使用我发布的页面(Published pages)中的 iFrames 吗?

我有:

  1. DISCOURSE_ENABLE_CORS: true 在我的 app.yml 中

  2. 在我的 Discourse (https://nOObish.me) 的 CORS origins 中添加了 Ghost 网站 URL https://story.pub

  3. 发布了一个页面:Are you a human? - n👀bish.me

  4. 在页面 … https://story.pub/discourse-page/ 中添加了 iFrame \u003ciframe src=\"https://noobish.me/pub/are-you-a-human\" width=100% height=700\u003e\u003c/iframe\u003e

我还有另一个想法,就是可能使用官方集成(Official Integration),但我认为它的工作方向是相反的 :interrobang:

我不知道,但有一个隐藏的站点设置 allow_embedding_site_in_an_iframe 你可以试试。

./launcher enter app
rails c
SiteSetting.allow_embedding_site_in_an_iframe=true
exit
exit
3 个赞

太棒了,成功了!非常感谢你,@pfaffman!!

Animation Money GIF

1 个赞

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.