mirror of
https://github.com/wassname/talk.git
synced 2026-06-28 14:13:38 +08:00
d3931db285
* docs: add docs for comment count integration * docs: update count docs * chore: improve integration docs
831 B
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.