# Embedding OCaml Discourse

**URL:** <https://discuss.ocaml.org/t/embedding-ocaml-discourse/139>\
**Category:** Site Feedback\
**Created:** [May 15, 2017, 2:12pm UTC](https://discuss.ocaml.org/t/embedding-ocaml-discourse/139 "2017-05-15T14:12:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SanderSpies](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/sanderspies/32/7_2.png) [@SanderSpies](https://discuss.ocaml.org/u/SanderSpies)\
**Post date:** [May 15, 2017, 2:12pm UTC](https://discuss.ocaml.org/t/embedding-ocaml-discourse/139/1 "2017-05-15T14:12:46Z")

</div>

Discourse has the ability to be embedded within other websites ([Embed Discourse comments on another website via Javascript - admins - Discourse Meta](https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963)). We want to use this for reviewing the updated version of Real World OCaml.

There is still some admin work needed to make this possible though (from the linked article):

> Configuring Discourse for Embedding (simple setup)

> The following setup will embed a comment feed on a page on a fake blog URL of [http://example.com/blog/entry-123.html](http://example.com/blog/entry-123.html), from a discourse forum running at [http://discourse.example.com](http://discourse.example.com).

> Visit Admin \> Customize \> Embedding on your Discourse install.

> Create at least one embeddable host. This should be the hostname (domain) where you want to embed your comments. In this case the host is [example.com](http://example.com) – note the lack of http:// and path.

> (optional) - if you supply a category alongside the host you are entering, posts imported from that host will automatically end up in that category. Different hosts can post to different categories.

> Fill in the name of a user on your discourse who will create topics in the Embed by Username field. Let’s assume our discourse has a user called eviltrout, so the value is eviltrout.

Besides Real World OCaml this might also be interesting for other websites.

---

<div class="post-metadata">

**Author:** ![avsm](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/avsm/32/6_2.png) [@avsm](https://discuss.ocaml.org/u/avsm)\
**Post date:** [May 15, 2017, 2:27pm UTC](https://discuss.ocaml.org/t/embedding-ocaml-discourse/139/2 "2017-05-15T14:27:34Z")

</div>

I’ve set this up for the realworldocaml domains – thanks for digging out the instructions. If anyone else wants to access the API for their own sites, please post here and @gasche or I can make the necessary changes.

---

<div class="post-metadata">

**Author:** ![avsm](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/avsm/32/6_2.png) [@avsm](https://discuss.ocaml.org/u/avsm)\
**Post date:** [May 15, 2017, 2:29pm UTC](https://discuss.ocaml.org/t/embedding-ocaml-discourse/139/3 "2017-05-15T14:29:36Z")

</div>

Having said that, I wonder if we need a staging forum to mess around with, since the API access only grants it to the production [realworldocaml.org](http://realworldocaml.org), so it’s not much use for day-to-day development…
