Expose external_id in embed.js

I’m assuming you created the topics via the API and set the external_id parameter.

I’m not sure if this helps, but Discourse has a t/external_id/:external_id route. It looks like it only returns JSON data:

So you can get the topic’s JSON at (for example )

/t/external_id/2023-4.json

That would return the content and id of the Discourse topic. I don’t think this solves your problem though.

Testing this now, JSON data is returned, but Discourse performs an automatic redirect to the actual Discourse topic URL when you make the request. For example a GET request to http://localhost:4200/t/external_id/1.json redirects me to http://localhost:4200/t/testing-the-external-id-param/206.json