Skip to content

Commit

Permalink
embed discuss
Browse files Browse the repository at this point in the history
  • Loading branch information
mli committed Nov 28, 2018
1 parent 9370351 commit 78a47af
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build/_static/discuss.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
$(document).ready(function () {
var discuss = $("#discuss")
var topic_id = discuss.attr("topic_id");
discuss.html('<div id="discourse-comments"></div>');
DiscourseEmbed = { discourseUrl: 'https://discuss.gluon.ai/', topicId: topic_id };
(function() {
var d = document.createElement('script'); d.type = 'text/javascript';
d.async = true;
d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
(document.getElementsByTagName('head')[0] ||
document.getElementsByTagName('body')[0]).appendChild(d);
})();
});
1 change: 1 addition & 0 deletions build/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,3 +387,4 @@ def setup(app):
app.add_config_value('recommonmark_config', {
}, True)
app.add_javascript('google_analytics.js')
app.add_javascript('discuss.js')

0 comments on commit 78a47af

Please sign in to comment.