Hi all,
I’m migrating my community to Discourse. I have a lot of existing content in my current community. It seems that the Javascript embed option is a viable way to show topics and comments in my site’s pages.
To make it possible to link the community content after it is migrated to Discourse to the correct page, I’m considering to use the external_id property.
I can set the property_id for each topic programmatically via the API, but I don’t know how to make use of it in the embedded code.
I have tried this:
<script type="text/javascript">
DiscourseEmbed = {
discourseUrl: 'https://discourse.mydomain.com/',
external_id: "296645"
};
(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);
})();
</script>
but it doesn’t work.
Is there something else I can try?