Files
talk/docs/source/version-5-integrating.md
T
Vinh d3931db285 [CORL-181] Add docs for comment count integration (#2598)
* docs: add docs for comment count integration

* docs: update count docs

* chore: improve integration docs
2019-10-01 19:27:00 +00:00

831 B

title, permalink
title permalink
Integrating on your site /v5/integrating/cms/

With Coral setup and running you can embed the comment stream with this sample embed script:

<div id="coral_thread"></div>
<script type="text/javascript">
  (function() {
      var d = document, s = d.createElement('script');
      var url = '{{ CORAL_DOMAIN_NAME }}';
      s.src = '//' + url + '/assets/js/embed.js';
      s.async = false;
      s.defer = true;
      s.onload = function() {
          Coral.createStreamEmbed({
              id: "coral_thread",
              autoRender: true,
              rootURL: '//' + url,
          });
      };
      (d.head || d.body).appendChild(s);
  })();
</script>`;

NOTE: Replace the value of {% raw %}{{ CORAL_DOMAIN_NAME }}{% endraw %} with the location of your running instance of Coral.