To embed Discourse comments from a specific topic ID into a Bevy website, follow these steps:
Configure Discourse for Embedding:
- Visit your Discourse admin panel and navigate to Admin > Customize > Embedding.
- Create at least one Embeddable Host. This should be the hostname (domain) of your Bevy site where you want to embed your comments. For example, if your Bevy site is hosted at
http://mybevysite.com
, usemybevysite.com
as the host. - Specify the Path Allowlist to define the paths on the remote host that will accept your embed. If you are unsure, use
/.*
- Optionally, set a Post to Category if you want posts imported from that host to automatically end up in a specific category.
- Fill in the Username for topic creation field with the name of a user on your Discourse (e.g.,
eviltrout
).
Configure the EmbedIt widget in Bevy:
- Browse to your Bevy's Admin Dashboard and create a new Embed It widget as explained in https://help.bevy.com/hc/en-us/articles/19160471045399-Introduction-and-Overview-Embed-It-for-Chapter-PagesÂ
- To display the topic comments, use the snippet
-
<script type="text/javascript"> Â
location.href = 'https://myinstance.discourse.group/embed/comments?topic_id=5'
</script> - Replace
myinstance.discourse.group
with your discourse site
The topic ID can use a variable to make it configurable in each chapter
Â
Comments